in reply to formating data input

A one-liner that would do the job is (not tested)

perl -ne '@a=split('\|',$_,3);pop;print join('|',@a)."\n";' <file

But it helps tremendously if you learn a bit of Perl to understand what's going on. Just copying and pasting a solution is a very dangerous thing.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds