- or download this
$s = pack "L", 0x03141593; # 4 byte string
$p = pack "P", $s; # pointer
printf "%08X\n", unpack "L", unpack "P4", $p;
- or download this
$s = "Kettle Of Fish"; # 14 byte string
$p = pack "P", $s; # packed pointer
printf "Length of the pointer: %d\n", length $p;
printf "10 byte string: %s\n", unpack "P10", $p;
- or download this
$int= unpack "L", unpack "P4", pack "L", $addr;