Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Missing bytes??

by Corion (Patriarch)
on Apr 06, 2008 at 15:36 UTC ( [id://678642]=note: print w/replies, xml ) Need Help??


in reply to Missing bytes??

You are reading from the file in two locations:

while (<FILE>) { ... read(FILE, $buf, 1);

More likely you want while (! eof FILE) { instead of reading a line from FILE and then reading another byte from FILE.

Replies are listed 'Best First'.
Re^2: Missing bytes??
by ikegami (Patriarch) on Apr 06, 2008 at 16:22 UTC
    or
    while (read(FILE, $buf, 1)) { ... }
Re^2: Missing bytes??
by stevee (Acolyte) on Apr 06, 2008 at 15:40 UTC
    Thanks Corion, trying it now. Sadly I did not realise that while (<FILE>) read the file too!
      interesting, what did you think ?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found