Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 having an uproarious good time at the Monastery: (6)
As of 2014-08-23 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls