in reply to Re^10: print() on closed filehandle
in thread print() on closed filehandle

Reread the node you just responded to. That error message indicates that it probably isn't a permissions error, but that the directory open is trying to create the file in doesn't exist. open with ">" will try to create the file if needed, but won't create the directory the file should be in; that has to already exist.

Replies are listed 'Best First'.
Re^12: print() on closed filehandle
by Win (Novice) on Dec 15, 2004 at 10:19 UTC
    The directory exists. I have write access to this directory when I do it manually. But when I try to write to this directory with a Perl program it won't let me. Has anyone come across this before?
      Try including both $! and $^E in the or die clause and see what that shows. If you manually create an empty file with the name the perl script will use, does that make it's open work?
        I tried to create a empty file before, and that didn't work. What does $^E do?