How join line and add | in front

Hello,

Did any one know how to use perl join line and add | in front

Input-->

timestamp=2009-11-10-04.55.20.829347;
a;
b;
c;
ddaa;

timestamp=2009-11-10-04.55.20.829347;
aa;
bb;
cc;

Output-->
|timestamp=2009-11-10-04.55.20.829347;a;b;c;ddaa;|timestamp=2009-11-10-04.55.20.829347;aa;bb;cc;

Thank You

HappyDay

 cat abc.txt
timestamp=2009-11-10-04.55.20.829347;
a;
b;
c;
ddaa;

timestamp=2009-11-10-04.55.20.829347;
aa;
bb;
cc;

 perl -e 'my $ln=0;
             while(<>){ 
                chomp;
                print "|"if (m/^timestamp/ && $ln);
                print"$_";
                $ln++;}
print"\n" '

HTH,
PL

if it is not perl, then use this.

cat abc.txt
timestamp=2009-11-10-04.55.20.829347;
a;
b;
c;
ddaa;

timestamp=2009-11-10-04.55.20.829347;
aa;
bb;
cc;

$cat abc.txt|awk '{if ( $0 ~ /time/ ) print "|"$0; else print $0}'|tr -d '\n'
|timestamp=2009-11-10-04.55.20.829347;a;b;c;ddaa;|timestamp=2009-11-10-04.55.20.829347;aa;bb;cc;