Help for this page

Select Code to Download


  1. or download this
    sub odd {
        return 1   if  "1" eq $_[0];
        die "Can't test the oddness of anything but '1'.\n";
    }
    
  2. or download this
    sub odd {
        my $num= shift @_;
    ...
        die "Out of range"   if  1 != (1+$num)-$num;
        return $num % 2;
    }