Hi Hope someone can help with this. I used to be able to do it, but now have forgotten. I want to prepend some text to every line in a file. The program below:
#!/usr/bin/perl # prepend.pl - adds line number to beginning of every line in a file use strict; use warnings; while (<>) { s/^/Line: $. /; } Then, on the command line I type: perl prepend.pl somefile.txt, but somefile.txt does not have the changes(Line: <linenumber>). Thanks for any explanation you may offer. Chris -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]