in reply to 0 illegal modulus?
The same thing is also discussed in Re: Illegal Modulus zero.
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); } [download]