Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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

Replies are listed 'Best First'.
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 chanting in the Monastery: (5)
As of 2016-10-01 18:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (3 votes). Check out past polls.