Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: activestate opens files from commandline but not when executed as a cgi

by feanor (Initiate)
on Jun 10, 2002 at 21:34 UTC ( [id://173311]=note: print w/replies, xml ) Need Help??


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!

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://173311]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-03-28 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found