in reply to Weird printing

If you want to stay with cat-ing the file then just do this
use strict; my $firstfile; my $secondfile; $firstfile = `/bin/cat template.html`; $secondfile = `/bin/cat data.txt`; $firstfile = ~s/%%insert_here%%/$secondfile/g; open(OUTFILE, ">foo.html") || die "Can't open $outfile for write: $!"; print OUTFILE $firstfile; close OUTFILE;


--BigJoe

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