in reply to Re: Writing to files
in thread Writing to files
I had better luck with this:
perl -i -p -e 'print "first line\n" if $. == 1;' data
It depends on the particular magic of $., of course.
|
---|
In Section
Seekers of Perl Wisdom