Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: 0 illegal modulus?

by Anonymous Monk
on May 01, 2012 at 03:35 UTC ( #968202=note: print w/ replies, xml ) Need Help??


in reply to Re: 0 illegal modulus?
in thread 0 illegal modulus?

This seems to work great, thank you!

#use DateTime::Util::Calc qw(mod); #sub mod { $_[1]*1 ? $_[0] % $_[1] : 0);} sub mod { my($x)=$_[0]; my($y)=$_[1]; while($x >= 0){ $x-=$y; } $x+=$y; return($x); }


Comment on Re^2: 0 illegal modulus?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-07-13 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (247 votes), past polls