Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

[SOLVED] Pack/unpack - understanding the '@' and '.' templactes

by ateague (Beadle)
on Mar 30, 2013 at 19:14 UTC ( #1026297=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    say unpack '(C.*/X/xa@1)3', "\003\003\003abcdef"; # prints 'aaa'
    say unpack '(C.*/X/xa@1)3', "\005\004\003abcdef"; # prints 'cba'
    
  2. or download this
    say unpack '(C/xa@)3', "\003\003\003abcdef"; # prints 'bcd'
    say unpack '(C/xa@)3', "\005\004\003abcdef"; # prints 'ddd'
    
  3. or download this
    say unpack '(C/xa@)3', "\003\003\003abcdef"; # prints 'bcd' - would li
    +ke 'aaa'
    say unpack '(C/xa@)3', "\005\004\003abcdef"; # prints 'ddd' - would li
    +ke 'cba'
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1026297]
Approved by toolic
Front-paged by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-07-02 00:19 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 (25 votes), past polls