rxguil has asked for the wisdom of the Perl Monks concerning the following question:
use CGI qw/:standard/; my $name = param(Name); my $address1 = param(Address1); ################################################################ # write info to a file open(FILE, ">>/data.txt") || die "The database could not be opened"; flock(FILE, 2); print FILE "$name\n"; flock(FILE, 8); close(FILE); ################################################################ $expires = "Tuesday, 1-Dec-2099 16:00:00 GMT"; $path = ""; $server_domain = "http://www.mydomain.com"; print "Set-Cookie: "; print "Name", "=", $name, "; expires=", $expires, "; path=", $path, "; domain=", $server_domain, "\n"; print "Address", "=", $address1, "; expires=", $expires, "; path=", $path, "; domain=", $server_domain, "\n"; print header; print "<body>"; print "The following data has been sent:"; print "<font color=blue>Name:</font> $name <br>"; print "<font color=blue>Address:</font> $address1 <br>";
update (broquaint): title change (was Writing to files)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing to files
by Aristotle (Chancellor) on Dec 17, 2002 at 19:20 UTC | |
by diotalevi (Canon) on Dec 17, 2002 at 19:41 UTC | |
by Aristotle (Chancellor) on Dec 17, 2002 at 20:02 UTC | |
|
Re: WRITING TO FILES
by jdporter (Paladin) on Dec 17, 2002 at 19:17 UTC | |
by chromatic (Archbishop) on Dec 17, 2002 at 20:59 UTC | |
by jdporter (Paladin) on Dec 17, 2002 at 21:09 UTC | |
by chromatic (Archbishop) on Dec 17, 2002 at 22:03 UTC | |
by jdporter (Paladin) on Dec 17, 2002 at 22:07 UTC | |
by Aristotle (Chancellor) on Dec 18, 2002 at 01:54 UTC | |
|
Re: Writing to files
by Mr. Muskrat (Canon) on Dec 17, 2002 at 19:20 UTC |