Help for this page

Select Code to Download


  1. or download this
    bash-2.04$ perl -e 'print 5 % foo'
    Illegal modulus zero at -e line 1.
    
  2. or download this
    bash-2.04$ perl -e '$x = 5; $y = "foo"; print ($y ? $x % $y : $x); pri
    +nt "\n"'
    Illegal modulus zero at -e line 1.
    ...
    0
    bash-2.04$ perl -e '$x = 5; $y = "foo"; print (($y*1) ? $x % $y : $x);
    + print "\n"'
    5