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

Re^2: modulo 1 (%1) and fractional part of a number

by Jenda (Abbot)
on Sep 27, 2018 at 12:11 UTC ( [id://1223148]=note: print w/replies, xml ) Need Help??


in reply to Re: modulo 1 (%1) and fractional part of a number
in thread modulo 1 (%1) and fractional part of a number

Only for simple $foo.

$foo->{bar}->baz( $bat, $ban, 5 * $bag) - int($foo->{bar}->baz( $bat, $ban, 5 * $bag))

Ain't so nice anymore.

Jenda
Enoch was right!
Enjoy the last years of Rome.

Replies are listed 'Best First'.
Re^3: modulo 1 (%1) and fractional part of a number
by hippo (Archbishop) on Sep 27, 2018 at 13:11 UTC

    Gnarly expressions are gnarly. Luckily Larry gave us subroutines.

    sub decpart { $_[0] - int $_[0]; } my $part = decpart ( $foo->{bar}->baz( $bat, $ban, 5 * $bag) );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2025-12-06 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (85 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.