Search notes:

Perl function: hex

hex EXPR returns the number of which EXRP is a hexadecimal representation with or without leading 0x or x.
#!/usr/bin/perl
use warnings;
use strict;

print(hex('10') + hex('0x1A')); # 42
Github repository about-perl, path: /functions/hex/basic.pl

Convert a hex string to a character string

#!/usr/bin/perl
use warnings;
use strict;

my $x = '48656c6c6f20576f726c6421';

for (my $i = 0; $i<length($x); $i+=2) {
   my $a = chr(hex(substr($x, $i, 2)));
   print $a;
}

print "\n";
Github repository about-perl, path: /functions/hex/hexstring-to-charstring.pl

See also

unpack

Index