Lunarpages Web Hosting Forum

Author Topic: please help!  (Read 1419 times)

Offline Zorfox

  • Intergalactic Cowboy
  • *****
  • Posts: 74
    • http://forums.zorfox.net/
please help!
« on: December 14, 2002, 09:28:00 PM »
When I use this code:

code:
#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);

open (FILE, ">/home/zorfox2/public_html/tests/file.html");
close (FILE);

$cheese = "hi";

# hi

print FILE "Content-Type: text/html\n\n";
print FILE "<html><head><title></title></head><body>";
print FILE "<br> $cheese. i am an alien. ";
print FILE "</body></html>";

open (AFILE, "/home/zorfox2/public_html/tests/file.html");
my @lines = <AFILE>;
close (AFILE);

$monkies = "poooooooooooo";

print <<END;
Content-Type: text/html\n\n

<html>
<head>
<title>$cheese</title>
</head>
<body>
$monkies <br>
END

for ($i = 0; $i <= $#lines; $i++) {
 print $lines[$i];
}

print <<END;

</body>
</html>
END

I get this:

pooooooooooo

(no other text)

File.html is just this:
code:
<html>
<head>
<title> poooooo </title>
</head>
<body>
<pre>

h

hdfh
sd


df



</pre>
</body>
</html>

test.pl is chmoded, uploaded, whocareseded, and file.html is all right also.
all paths (to perl and to file.html) are correct.

WHAT'S UP WITH THAT?

Can someone please give me a sample script to use? or tell me what's up with my test.pl?

thanx
cheese