Help for this page

Select Code to Download


  1. or download this
    use strict;
    
    ...
    for my $hex ($out =~ /(\S{2})/g) {  # split the strings into chunks of
    + two chars
      printf "hex => %s, binary => %08B\n", $hex, hex($hex);
    }
    
  2. or download this
    __OUTPUT__
    hex => 12, binary => 00010010
    ...
    hex => DE, binary => 11011110
    hex => 8F, binary => 10001111
    hex => 45, binary => 01000101