Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How to process each byte in a binary file?

by kschwab (Vicar)
on Aug 12, 2002 at 20:58 UTC ( [id://189628]=note: print w/replies, xml ) Need Help??


in reply to How to process each byte in a binary file?

How about IO::Scalar or IO::String ?

You could then seek() and tell() around the string, or read() in 1 byte increments.

I'm not sure what's under the covers, but both seem elegant from the outside.

  • Comment on Re: How to process each byte in a binary file?

Replies are listed 'Best First'.
Re: Re: How to process each byte in a binary file?
by John M. Dlugosz (Monsignor) on Aug 12, 2002 at 21:27 UTC
    Doing a read of one byte does indeed work better than changing the input record size as suggested by an earlier reply.

    It also runs an order of magnitude slower than the next slower method under discussion!

    How it works under the covers? It uses substr.

    —John

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-23 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found