Help for this page

Select Code to Download


  1. or download this
    sub odd {
        die 'Out of integer range' 
            if $_[ 0 ] & 0xffffffff != $_[ 0 ]; ## Should be done by perl!
        return $_[ 0 ] & 1;
    }
    
  2. or download this
    sub odd {
        my $num= shift @ARGV;
    ...
    
        return $num % 2 ? 1 : 0;
    }