Actually, since the output of the command is sent to stdout, and > and | both redirect stdout, they are basically the same. Only > sends to a file, and | sends to stdin of the next command.
you have to remeber, most everything on a UNIX machine are files, and files are streams of ASCII bytes. STDOUT/STDERR/STDIN are all files, so you can deal with them the same way you deal with text files/data files/etc...