Thread: Perl code
View Single Post
Old 08-23-2002, 04:17 PM  
NetRodent
Confirmed User
 
Join Date: Jan 2002
Location: In the walls of your house.
Posts: 3,985
Here's one way to do it, although it is much more resource intensive to do it this way as opposed to simply appending the listing at the end:

$newdata = 'whatever';

local $/ = undef;
open(IN, "<$file");
$olddata = &ltIN&gt;
close IN;

open(OUT, ">$file");
print $newdata."\n"
print $olddate;
close OUT;
NetRodent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote