preCharge Forums - View Single Post - Writing Slurped Data Fails
View Single Post
Old 07-02-2006   #1 (permalink)
jeremiah
Junior Member
 
Join Date: Jul 2006
Age: 49
Posts: 6
Default Writing Slurped Data Fails

Hi folks, I'm a bit new to Perl and still am working my way through it, so bear with me.

I want to generate webpages. (Of course!) All that changes is the middle of the page. I slurp in the top half of the page like so:

undef $/;
$file = "mptop.txt";
open INPUT, "$file";
$mptop = <INPUT>;
close INPUT; # slurped in top

And then the bottom half in a similar manner.

Then I go to print it:

# write in the top part of the HTML
print "document.write(\'$mptop\')\;";

But all I get is a blank page and the usual nondescript error in the SUEXEC log showing my script's name.

I perform no operations on the slurped in string. I'm merely copying it out of the file and into the webpage I'm generating (it's in a file because I don't want to deal with the HTML in the .pl file itself).

Any suggestions would be much appreciated, and thanks in advance!

Jeremiah
jeremiah is offline   Reply With Quote

 
Loans | Mortgage | Credit Card Debt Consolidation | Mortgages | Debt Consolidation