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

Losing Bits with Pack/Unpack

by o0lit3 (Friar)
on Sep 16, 2020 at 19:50 UTC ( [id://11121852]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $\="\n";
    $_='Hello World!'; print;
    $_=pack'(U)*',map{hex}unpack'(H5)*'; print;
    $_=pack'(H5)*',map{sprintf"%05X",$_}unpack'(U)*'; print;
    
  2. or download this
    $\="\n";
    $_='Hello World!'; print;
    $_=pack'(U)*',map{hex}unpack'(H4)*'; print;
    $_=pack'(H4)*',map{sprintf"%04X",$_}unpack'(U)*'; print;
    
  3. or download this
    $\="\n";
    $_='Hello World!'; print;
    $_=pack'(U)*',map{hex}unpack'(H4)*'; print;
    $_=pack'n*',unpack'(U)*'; print
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-26 05:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found