>what does a closed filehandle error mean? i'm trying to write to a log
>and yes, the permissions for the directory and the log are 777.
A closed filehandle means that the pipe (ie., the tunnel that connects your
perl script to the innards of the file) is no longer there. See the
examples below:
open(PIPE_TO, "your-filename");
print PIPE_TO "burp!";
close PIPE_TO;
print PIPE_TO "sadness";
The "burp" line will print to the file correctly (assuming we were able to
create the pipe to "your-filename"). The "sadness" line, however, won't
because we've closed the pipe.
You *definitely* want to test that the pipe is created successfully. The
code above is much nicer like this:
open(PIPE_TO, "your-filename") or die "Problem!: $!";
This has a double benefit. If the pipe isn't open correctly, then you'll
get "Problem!:" printed to STDOUT. Along with problem is a magical thingy
called $!, which contains a remotely specific error on why the pipe
couldn't be open in the first place...
Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/