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

So what was the error message? Did you figure out how to fix the problem?

Replies are listed 'Best First'.
Re^8: print() on closed filehandle
by Win (Novice) on Dec 14, 2004 at 17:23 UTC
    The error message was:
    Unable to open G:/Directory_path/Flat_file_test_C_out.txt: No such fil +e or directory

      That's the error I get when I do:
      perl -e "open(FILE, '>nonexistant/test') or die($!);"
      Since you're creating the file, it means the path ("nonexistant/" in my case, "G:/Directory_path/" in yours) doesn't exist.

      Check for typos. Copy and paste the path from somewhere (the address bar of Windows Explorer, for example) to make sure there are no typos.

      Are you running your script as a service? G: is not likely to exist for a service.

      See what happens if you use c:/out.txt instead.

        It works when I do C:/out.txt. So I don't seem to have permissions to write to the G: drive. But I can read from the G: drive. I have set maximum permissions for the drives. I don't know what to do now.