in reply to Prepending characters to lines in file

Read each line:
while (<>) {
prepend the stuff and write it out
print "> ", $_;
You can do that using command-line switches and stuff:
perl -i.bak -n -e "print '> ', $_" file1.txt file2.txt etc.etc
Look up -i -e -n in the perlrun man page. Get a copy of the Perl Cookbook, or one of the introductary texts.

—John

Replies are listed 'Best First'.
Re: Re: Prepending characters to lines in file
by Anonymous Monk on Aug 03, 2001 at 03:59 UTC
    Thanks for the help.