in reply to Writing to files
Two comments: use Fcntl qw(:flock); and write flock FILE, LOCK_EX; instead of using the cryptic magic values. Also, don't unlock a locked file, ever, unless you know what you're doing - just close it and the lock will go away.
Did you check your error logs? Is the scripting dieing at the open? Btw, you should prefer the three argument form: open(FILE, ">>", "/data.txt").
If not, does your platform support flock at all? There should be something about that in your error log as well if that's the case.
Update: Also, why not use CGI.pm's perfectly fine cookie-generation functions?
print header(-cookie => cookie( -name => $name, -expires => $expires, -path => $path, -domain => $server_domain, -value => "there is none in your example", ));
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Writing to files
by diotalevi (Canon) on Dec 17, 2002 at 19:41 UTC | |
by Aristotle (Chancellor) on Dec 17, 2002 at 20:02 UTC |