Help for this page

Select Code to Download


  1. or download this
    $_ = "\x32\x54\x76\x98"  #  2557891634 as a 32-bit unsigned LE int
       . "\x32\x54\x76\x98"  # -1737075662 as a 32-bit signed   LE int
    ...
    my @nums = unpack('VVvv', $_);
    $_ = unpack('l', pack('L', $_)) for @nums[1];  # Fix signs of longs.
    $_ = unpack('s', pack('S', $_)) for @nums[3];  # Fix signs of shorts.
    
  2. or download this
    $_ = "\x34\x01";
    my @nums = unpack('s', $_);
    my @flags = ( split //, unpack('B16', pack('n', $nums[0])) )[16-9 .. 1
    +6-1];