in reply to Writing infront of the file

First read what merlyn posted. There is a great deal of good information that comes out of these documents. But for ideas here is one
use strict; my $wholepage = `/bin/cat filename.txt`; open(OUTFILE, ">filename.txt") || die "Could not open outfile $!"; print OUTFILE "your lines"; print OUTFILE $wholepage; close OUTFILE;
Remember this was just an idea. It probably isn't close to best solution.

--BigJoe

Learn patience, you must.
Young PerlMonk, craves Not these things.