Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: sysopen function call

by rpike (Scribe)
on Sep 08, 2010 at 14:24 UTC ( #859330=note: print w/ replies, xml ) Need Help??


in reply to Re^3: sysopen function call
in thread sysopen function call

That's about it.

use List::Util; sysopen (my $logHdl, "C:/directory1/directory2/directory3/logs/LOGFILE +.txt", O_RDWR | O_CREAT) or die "Content-type: text/html\n\nCannot op +en file for writing. ".$!;
The only code I'm trying out is a sysopen line as you can see. The web user has full permissions needed, first thing I checked. The code actually fails from command line as well so both users are in the same boat.


Comment on Re^4: sysopen function call
Download Code
Re^5: sysopen function call
by mr_mischief (Monsignor) on Sep 08, 2010 at 15:12 UTC
    Is that really all of your code? Did you use Fcntl; as alluded to by the docs for sysopen? If you don't load the proper constants, the O_CREAT flag does you no good, and you can't open the nonexistent file. This would be the expected behavior for trying to open a non-existent file without the O_CREAT flag.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2015-07-04 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls