in reply to Rounding of a number...
One way is to just drop the trailing digits:
my $x = $yearlyamount / 52; $x =~ s/(\.\d\d)\d*$/$1/;
|
---|
In Section
Seekers of Perl Wisdom
in reply to Rounding of a number...
One way is to just drop the trailing digits:
my $x = $yearlyamount / 52; $x =~ s/(\.\d\d)\d*$/$1/;
|
---|