Help with printing HTML in Perl
I am new to perl (progging for about 1/2 a year now) and have stuck to simple code thus far, however, simple code has had me printing increasingly complicated and large HTML pages from the actual program file, and this has obviously resulted in horridly messy code.
So, I decided to step into unknown territories and have so far failed to solve this problem.
That is to say, what I'm trying to do is leave the references on the file then just print the file through the program, therefore slashing the program size and making the code much neater.
However, so far it has not recognised the variable references in the file. (I guess this is a simple problem for you guys, but hey)
here's a snapshot of what I'm doing:
HTML FILE: (created with dreamweaver)
Untitled Document
hello $nick
__________________
Prog: (created with Komodo)
#!/perl/bin -w
print "Content-type: text/html", "\n";
print "Pragma: no-cache", "\n\n";
$nick = "pumpingpump";
open (NICKTEST, "nicktest.htm");
$count = 0;
while ($nicktest = ) {
$nickstore[$count] = $nicktest;
$count += 1;
}
close (NICKTEST);
print (@nickstore);
__________________
the output is:
Content-type: text/html
Pragma: no-cache
Untitled Document
hello $nick
and of course, if you have read the above, I want that $nick in the output to be "pumpingpump"
can you help me?