Help for this page

Select Code to Download


  1. or download this
    # Add $value to sorted @array, if it's not already there.
    $idx = binsearch { $a <=> $b } $value, @array;
    splice(@array, ~$idx, 0, $value) if ($idx < 0);
    
  2. or download this
    sub _unsigned_to_signed {
       return unpack('i', pack('I', $_[0]));
    ...
          }      
       }
    }