
muinatit
Deleted
Feb 16, 2001, 8:52 AM
Post #1 of 9
(832 views)
|
|
Adding to the beginning of a file
|
Can't Post
|
|
Yes, I've read the thread that the FAQ points to, but that thread didn't give me the answer I'm looking for. What I want to know how to do is how to add content to the beginning of a file, without doing this...
open INF, 'file.txt' or die $!; @array = <INF>; close INF; open INF, '>file.txt' or die $!; print INF "new content\n"; print @array; close INF; 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? Jeffrey "muinatit" Lamoureux muinatit@hotpop.com
|