![]() |
I need to ADD to the BEGINNING of a data file
Hello,
I have done my best in trying to find a way to be able to do the following in Perl. I have a text file (data.txt) that I would like to add some info at the beginning of the file (prepend I believe, not append). From what I have gathered, "append" adds to the "end" of a file. I need to add to the "beginning" of a file after a form submission. Any help would be appreciated, thank you. Here is what I have so far: Code:
#!/usr/bin/perl -w |
Re: I need to ADD to the BEGINNING of a data file
There's no direct way of doing it, check this http://www.tek-tips.com/viewthread.cfm?qid=840900
|
Re: I need to ADD to the BEGINNING of a data file
Try this:
Code:
use strict;Hope that helps |
| All times are GMT +5.5. The time now is 06:24. |