Feb 16, 2001, 8:52 AM
Post #1 of 9
Yes, I've read the thread that the FAQ points to, but that thread didn't give me the answer I'm looking for.
Adding to the beginning of a file
What I want to know how to do is how to add content to the beginning of a file, without doing this...
I've always done it that way, but I've learned from the boards that reading files into arrays isn't the best thing to do. So how should I do this?
open INF, 'file.txt' or die $!;
@array = <INF>;
open INF, '>file.txt' or die $!;
print INF "new content\n";
Jeffrey "muinatit" Lamoureux