Help for this page

Select Code to Download


  1. or download this
    my $value = ord $byte;
    my @values = map { ord } split //, $bytes;
    
  2. or download this
    my $value = unpack "C", $byte;
    my @values = unpack "C*", $bytes;
    
  3. or download this
    my $hex = unpack "H", $byte;
    my $hexstring = unpack "H*", $bytes;
    my @hex = unpack "H2" x length($bytes), $bytes;
    
  4. or download this
    my @hex = ((unpack "H*", $bytes) =~ /(..)/g);