Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: write/syswrite return value differences

by dave_the_m (Parson)
on Nov 24, 2011 at 10:15 UTC ( #939843=note: print w/ replies, xml ) Need Help??


in reply to write/syswrite return value differences

why on earth write() isn't returning the number of bytes written?
Because the write() method (which is just a thin wrapper round print()), does buffering, so it will never return having output less bytes than you requested (unless there's an error, in which case it returns false). So there's not a lot of point in returning the number of bytes written.

Dave.


Comment on Re: write/syswrite return value differences

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2014-11-29 00:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (200 votes), past polls