akm2 has asked for the wisdom of the Perl Monks concerning the following question:
The problem is this: As the script reads the HTML file & finds $var, I want it to print the content of $var. I don't want it to actually print "$var". Any suggestions?sub DisplayHTML() { $HTMLFileName = @_[0]; open(HTMLFNH,"<$HTMLFileName") || die "Can't open file"; print "Content-type: text/html\n\n"; while ($HTMLLine=<HTMLFNH>) { chomp $HTMLLine; print "$HTMLLine\n"; } close(HTMLFNH); } return 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Display $var content
by chromatic (Archbishop) on Feb 27, 2001 at 01:53 UTC | |
|
Re: Display $var content
by chipmunk (Parson) on Feb 27, 2001 at 01:51 UTC | |
|
Re: Display $var content
by $code or die (Deacon) on Feb 27, 2001 at 01:52 UTC | |
|
Re: Display $var content
by dws (Chancellor) on Feb 27, 2001 at 01:58 UTC | |
by extremely (Priest) on Feb 27, 2001 at 04:04 UTC | |
by chipmunk (Parson) on Feb 27, 2001 at 04:13 UTC | |
|
Re: Display $var content
by Masem (Monsignor) on Feb 27, 2001 at 02:01 UTC |