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

Re: To read Char-by-Char from a file

by rob_au (Abbot)
on May 12, 2005 at 11:10 UTC ( #456344=note: print w/replies, xml ) Need Help??


in reply to To read Char-by-Char from a file

If you have an open file handle, see perlfunc:getc, otherwise cog's suggestion is quite elegant (assuming your character-set is not "wide", requiring more than one byte per character).

 

perl -le "print unpack'N', pack'B32', '00000000000000000000001000000000'"

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2018-11-22 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (253 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!