Help for this page

Select Code to Download


  1. or download this
    my %h = (
        decimalhex => sub{return sprintf("0x%x", shift)},
    ...
    print $h{decimalhex}($var), "\n";
    print $h{decimalbinary}($var), "\n";
    print $h{hexdecimal}($var), "\n";
    
  2. or download this
    sub dechex {
      my $number = shift @_;
    ...
    print $dh, "\n"
    print $db, "\n";
    print $hd, "\n";