Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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


Comment on Re: Function to produce formatted ord values of a string
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (15)
As of 2015-07-28 18:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls