Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: How do unpack templates work

by unlinker (Monk)
on Jul 20, 2012 at 17:48 UTC ( #982872=note: print w/ replies, xml ) Need Help??


in reply to Re: How do unpack templates work
in thread How do unpack templates work

Thanks. I do not want hex digits - I just want to split the binary string into two parts. I was using

substr
until I read that unpack is faster and more efficient.


Comment on Re^2: How do unpack templates work
Re^3: How do unpack templates work
by jwkrahn (Monsignor) on Jul 20, 2012 at 22:51 UTC

    Or you could use a regular expression:

    my ( $uu1, $uu2 ) = $uuid =~ /(\C{4})(\C+)/;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (17)
As of 2015-07-02 18:53 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 (44 votes), past polls