Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Casting return value of unpack properly

by jethro (Monsignor)
on Feb 12, 2013 at 16:00 UTC ( #1018401=note: print w/ replies, xml ) Need Help??


in reply to Casting return value of unpack properly

I got the following results with perl v5.14.2:

my $string="1234567812345678"; print join("_", unpack("H32V*", $string)),"\n"; my @temp = unpack("H32V*", $string); print join("_", @temp),"\n"; $string="12345678123456781111"; print join("_", unpack("H32V*", $string)),"\n"; @temp = unpack("H32V*", $string); print join("_", @temp),"\n"; #prints: 31323348355037383132333435363738 31323348355037383132333435363738 31323334353637383132333435363738_825307441 31323334353637383132333435363738_825307441

As you can see, no difference between the two forms


Comment on Re: Casting return value of unpack properly
Download Code
Re^2: Casting return value of unpack properly
by puterboy (Scribe) on Feb 12, 2013 at 16:39 UTC
    You are correct... I'm not sure what changed but I could have sworn it wasn't working before....
Re^2: Casting return value of unpack properly
by mbethke (Hermit) on Feb 12, 2013 at 16:53 UTC
    Edit: *whistle*

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2015-07-04 16:03 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 (60 votes), past polls