Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: 0 illegal modulus?

by Vynce (Friar)
on Jun 15, 2001 at 13:33 UTC ( #88732=note: print w/ replies, xml ) Need Help??

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
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://88732]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-12-20 09:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls