D
Dave
I would like to write something at the begginging of a text file,
without overwriting what is already there.
i.e if the file 'foo' contains
two
three
four
I would like to be able to prepend 'one'
so the file reads
one
two
three
four
How is the best way to do this?
On a UNIX sheel script I could do it by writing the new data (in this
case the word 'one') into another file, then using cat
But I am not sure how to do any of this in perl. I'm using a UNIX
system, and Perl 5.8.6
without overwriting what is already there.
i.e if the file 'foo' contains
two
three
four
I would like to be able to prepend 'one'
so the file reads
one
two
three
four
How is the best way to do this?
On a UNIX sheel script I could do it by writing the new data (in this
case the word 'one') into another file, then using cat
But I am not sure how to do any of this in perl. I'm using a UNIX
system, and Perl 5.8.6