Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 one hand claps...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-01-19 23:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (173 votes). Check out past polls.