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

Re^2: PerlIO, random write file access and O_CREAT (sysopen)

by vsespb (Chaplain)
on May 29, 2013 at 15:46 UTC ( #1035873=note: print w/replies, xml ) Need Help??

in reply to Re: PerlIO, random write file access and O_CREAT (sysopen)
in thread PerlIO, random write file access and O_CREAT

I thought sysopen can't be mixes with print/read, as buffered IO and unbuffered cannot be mixed? And I mentioned that I don't want to use syswrite

Or sysopen is not about unbuffered IO (in opposite to syswrite) ?

(Note that your code still unconditionally truncates the file each time.)
Ok, could you please example why? First file open mode is append, and second is read (read/write)
  • Comment on Re^2: PerlIO, random write file access and O_CREAT (sysopen)

Replies are listed 'Best First'.
Re^3: PerlIO, random write file access and O_CREAT (sysopen)
by tye (Sage) on May 29, 2013 at 15:58 UTC

    Oh, right, the append prevents the truncate. My mistake.

    sysopen is just a different way of getting a file handle. It has no bearing on whether you use buffered or unbuffered I/O with that handle.

    - tye        

      Ok, thanks!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1035873]
[marioroy]: We made it all the way to the end. The expience was magical. I not good at sports. Someone or thing was there.
erix considers extracting a catalog ...
[karlgoethebier]: marioroy: Racket ball is considered harmful, like Squash
[marioroy]: Wait till folks see what MCE::Hobo can do in the upcoming release. Multiple instances, nested spawning, 3 levels, doesn't matter. it works on Windiows too.
[Lady_Aleena]: I hate sites that tell me to turn ad-blocker off. They should know better.
[marioroy]: s/Windiows/ Windows/
[Discipulus]: marioroy can you expand that Niagara's fall history?
erix only sees fallen angels
erix if it weren't for bad luck, I'd have no luck at all
Discipulus Windiows the OS of native americans..

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2017-05-29 08:46 GMT
Find Nodes?
    Voting Booth?