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) );