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.
Comment on
RE: Re: Writing to files
Download
Code
In Section
Seekers of Perl Wisdom