++ Thanks, that's a really interesting answer, though I think a simple function (see above) might be easier for whoever maintains my library to understand at first glance ;). It's also a shame that it isn't possible to directly re-open the method definitions of '/' and '+' for numeric scalars in Perl.
As an aside, does this solution using numeric classes make anyone else pine for them in Perl (Float, Integer, Complex ...)?
|Replies are listed 'Best First'.|
Re^3: Surviving 'Illegal division by zero'
by dragonchild (Archbishop) on Jun 23, 2004 at 14:36 UTC