Help for this page

Select Code to Download


  1. or download this
    print unpack "H*", pack("H*", map { "0" x (length($_) % 2) . $_ } "a12
    +");
    print unpack "H*", pack("H*", "0" x (length($_) % 2) . $_ ) for "a12";
    
  2. or download this
    sub zpad { my ($str,) = @_; length($str)%2 ? "0$str" : $str }
    print unpack 'H*', pack 'H*', zpad "a30"