Help for this page

Select Code to Download


  1. or download this
    $s = pack "L", 0x03141593;  # 4 byte string 
    $p = pack "P", $s;          # pointer
    printf "%08X\n", unpack "L", unpack "P4", $p;
    
  2. 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;
    
  3. or download this
    $int= unpack "L", unpack "P4", pack "L", $addr;