Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Losing Bits with Pack/Unpack

by o0lit3 (Friar)
on Sep 16, 2020 at 19:50 UTC ( #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? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2022-01-21 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (57 votes). Check out past polls.

    Notices?