in reply to Can't open file using Perl as CGI

timtowtdi:

The program is likely (a) not running in the directory you think it is, and/or (b) not running as a user with permissions to read the file.

You might try printing the current directory out in your program.

...roboticus

who isn't going to even mention using the CGI.pm module....

Replies are listed 'Best First'.
Re^2: Can't open file using Perl as CGI
by JennieInMI (Acolyte) on Dec 27, 2012 at 02:14 UTC

    Thank you!

    I am embarassed to say how long I tried to figure out why the heck Perl could not find a file in the same directory as my script. I wasn't executing the script from the script's directory! Was typing in the whole path to the script and everything. duh! I'm fairly new, but even I know better than that. Thank you for pointing out the (much needed) obvious.

    If you were in the same room I would hug you.

    Seriously.