in reply to Reading data from file

If you just want to separate pipe-delimited data to a file or standard out there's always the cut command, e.g.:
cut -f1 -d"|" infile