in reply to activestate opens files from commandline but not when executed as a cgi

THE ANSWER IS: use single quotes, not double quotes in the open() statement.

So:
open(HEADER, 'D:\path\to\file\file.txt') || die ("$!"); This works!

NOT: open(HEADER, "D:\path\to\file\file.txt") || die ("$!"); This doesn't work!
  • Comment on Re: activestate opens files from commandline but not when executed as a cgi

Replies are listed 'Best First'.
Re: Re: activestate opens files from commandline but not when executed as a cgi
by feanor (Initiate) on Jun 10, 2002 at 21:47 UTC
    or escape the slashes, of course