Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Please advise why this wont print the variable $webpage1 with the value of "first"??
It doesnt print the value on my page or in the text file. The text file doesnt have any data in it. why doesnt this work??
use CGI qw(:all); print header; $webpage1 = param("first"); print "<html><head> <title>Web Pages for local data.</title> </head><body>"; $filepath = "C:/inetpub/wwwroot/fil.txt"; $newtext = "$webpage1\n"; open (FILE, ">>$filepath") || "Did not write:$!\n"; print FILE $newtext; close (FILE); print "<p>Data submitted.<br><b>$newtext</b></p>"; print "</body></html>";
Edited: ~Thu Aug 1 13:58:44 2002 (GMT) by footpad: Added HTML formatting tags, per Consideration.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Wont write to text file.
by katgirl (Hermit) on Aug 01, 2002 at 10:50 UTC | |
|
Re: Wont write to text file.
by crenz (Priest) on Aug 01, 2002 at 10:52 UTC | |
by chromatic (Archbishop) on Aug 01, 2002 at 14:50 UTC | |
by crenz (Priest) on Aug 01, 2002 at 15:10 UTC | |
|
Re: Wont write to text file.
by ajt (Prior) on Aug 01, 2002 at 10:54 UTC | |
|
Re: Wont write to text file.
by TStanley (Canon) on Aug 01, 2002 at 10:57 UTC | |
|
Re: Wont write to text file.
by valdez (Monsignor) on Aug 01, 2002 at 10:41 UTC | |
|
Re: Wont write to text file.
by cLive ;-) (Prior) on Aug 01, 2002 at 11:05 UTC | |
by Anonymous Monk on Aug 01, 2002 at 11:32 UTC |