Page is a not externally linkable
- Code, Content, and Presentation
-- Perl Server Side CGI Scripting
---- I need to ADD to the BEGINNING of a data file


phranque - 9:03 am on Feb 14, 2012 (gmt 0)


there is no native prepend operator/capability/command in perl.
but as always with perl - TIMTOWTDI.
depending on your requirements for fault tolerance, this simple method may suffice:
- write the form data to a temporary file
- copy your text file to the temp file
- rename the temp file to your original text file name, replacing the original contents with the prepended version


Thread source:: http://www.webmasterworld.com/perl/4417237.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com