in reply to Modulo of fraction?
use strict; use warnings; print myrem(4, 2.5); sub myrem { return $_[0] - int ($_[0] / $_[1]) * $_[1]; }; [download]