Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Buffered IO and un-intended slurping

by dk (Chaplain)
on Jan 03, 2010 at 10:56 UTC ( [id://815411]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Buffered IO and un-intended slurping
in thread Buffered IO and un-intended slurping

If, as you say, you never mix buffered and unbuffered I/O, and never alter $/, then there's something fishy and unexpected. I sincerely doubt that seek() calls, even if done on a buffered stream and even with mixed dos and unix newlines, would produce such an effect. I'd investigate further to find what causes the slurping, at least to make clear if that's a perl bug or not.

otoh, if you're only interested in a practical solution, just switch to read($f, $buf, 41) instead of readline, which depends on $/.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-28 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found