Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: open vs. sysopen

by melora (Scribe)
on Dec 26, 2003 at 17:55 UTC ( #317105=note: print w/replies, xml ) Need Help??


in reply to open vs. sysopen

Okay, it was just a thought (kind of thing I'd goof up). I played with sysopen a little (not use-ing anything at all) and this worked okay (I shifted $file from the command line, and it was simply sheep.txt):
sysopen(FH, $file, O_WRONLY | O_TRUNC | O_CREAT); print FH "Whooyah";
goshdammitforgot to use code brackets! It did write Whooyah to the file, so it worked all right. So maybe the trouble is in the $file string you're giving it, after all.

Replies are listed 'Best First'.
yes to close()
by sheep (Chaplain) on Dec 26, 2003 at 18:09 UTC
    I tried one or the other (commenting out one) not both at the same time.
    The "$ggg" file, as well as "DEST" filehandle is used only in this bit.
      Okay, it was just a thought (kind of thing I'd goof up). I played with sysopen a little (not use-ing anything at all) and this worked okay (I shifted $file from the command line, and it was simply sheep.txt): sysopen(FH, $file, O_WRONLY | O_TRUNC | O_CREAT); print FH "Whooyah"; It did write Whooyah to the file, so it worked all right. So maybe the trouble is in the $file string you're giving it, after all.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2021-10-17 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (70 votes). Check out past polls.

    Notices?