Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Function to produce formatted ord values of a string

by Anonymous Monk
on Apr 20, 2012 at 08:41 UTC ( #966132=note: print w/replies, xml ) Need Help??


in reply to Function to produce formatted ord values of a string

From unpack  sub ordinal { unpack("W",$_[0]); } # same as ord()

So  sub ords { pack '(A4)*', unpack 'W*', @_ } though this only pads spaces to the right, and truncates

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://966132]
help
Chatterbox?
[Corion]: I guess I should stage some product photos for Sane Dots Supplies ;)
[marto]: I had some ideas about that Corion
[marto]: I'll send a message over the weekend maybe :P
[Corion]: choroba: I avoided the "fun" of emergency shopping for a new flat iron by trying the flat iron without the timer that sat between it and the mains power. Seems as if just the timer is broken.
[Corion]: marto: Heh, would be cool!
Corion munches on the traditional German winter fruit, strawberries. Imported from Spain at the price of EUR 0.77 per 150g - not really cheap but surprisingly good for a winter produce

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2017-01-20 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (174 votes). Check out past polls.