Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: (jeffa) Re: A better mod (%) operator?

by hossman (Prior)
on Jul 09, 2002 at 02:38 UTC ( #180384=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use overload '*' => sub {
        my $div = int(${$_[0]} / ${$_[1]});
        my $mod = ${$_[0]} % ${$_[1]};
        return ($div, $mod);
    };
    
  2. or download this
    package mod;
    use strict;
    ...
    __END__
    dot
    dot
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2021-05-12 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (124 votes). Check out past polls.

    Notices?