Okay, so I do a "perl -pi -e 's/$/;/g' <filename>" to try and append a
semicolon to the end of each record in a file in Linux.
 
It does that just fine. Unfortunately it also prepends a semicolon onto
the beginning of each record too.
 
Now, I can vi the file and do a ":%s/$/;/g" and it works just fine.
 
Why does Perl put a semicolon at the end AND beginning of each line? I
have a feeling it involves the newline character but I''m not sure just
how yet.
 
I'm starting out with one-liners and working my self up to an actual
script here.  :>)
 
Thanks,
--Walt

Reply via email to