Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: pack() v unpack() padding: bug or ???

by Athanasius (Archbishop)
on Feb 16, 2015 at 16:11 UTC ( #1116886=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     2:03 >perl -MData::Dump -wE "my @c = unpack '(A2)*', 'f 12dx z'; dd \
    +@c;"
    ["f", 12, "dx", " z"]
    
     2:04 >
    
  2. or download this
    print unpack 'C*', pack '(Z2)*', 'fr','ed','x';;
    102 0 101 0 120 0  ## Note! the 'r' & 'd' characters have been thrown 
    +away? Another bug?
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (1)
As of 2022-05-19 01:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (71 votes). Check out past polls.

    Notices?