[Israel.pm] How to open a file on a network drive, using CGI.

Shlomo Yona shlomo at cs.haifa.ac.il
Mon May 3 10:11:27 PDT 2004

On Mon, 3 May 2004, Gabor Szabo wrote:

> On Mon, 3 May 2004, roi sh wrote:
> > yes: the error is : no such file or directory.
> >
> > please note, that running from the network itself, the directory is
> > recognized.
> >
> Well, then it seems you are not accesing the correct file or the path
> to it is missing.  Now what I think we need is the string of the
> filename as you pass to open:
> open FH, $filename;      # send us what $filename contains

open FH, $filename or die "Cannot open |$filename| for reading: $!\n";

Will send to your error log (or to the place STDERR is
redirected to). This will print the content of $filename and
the reason of failure if one occurs.

Shlomo Yona
shlomo at cs.haifa.ac.il

More information about the Perl mailing list