"Chris Charley" <[EMAIL PROTECTED]> wrote in message news:...
[snip]
> while (<>) {
> s/^/Line: $. /;
> }
Should be (works correctly):
while (<>) {
s/^/Line: $. /;
print;
}
Then the command could be: perl prepend.pl somefile.txt > somefile.new
which would correctly print to the 'new' file the somefile.txt file with the
line numbers prepended.
Chris
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
