Help for this page

Select Code to Download


  1. or download this
    my $n = 534587;
    print "even\n" if($n % 2 == 0);    # modulo operator of possibly a flo
    +at or possibly an integer (*)
    
  2. or download this
    use integer;
    my $n = 534587;
    print "even\n" if($n & 1 == 0);    # checking LSB with Bitwise And on 
    +an integer