in reply to Re: Want to Truncate A Number... NOT round it
in thread Want to Truncate A Number... NOT round it

Wouldn't
$na =~ s/(?<=\.\d\d\d)\d*$//;
be done better and clearer as:
chop $na;
?

Liz

Update:
Since the 4 digits are guaranteed by the sprintf, there should be no problem in using chop().

Replies are listed 'Best First'.
Re^3: Want to Truncate A Number... NOT round it
by Nkuvu (Priest) on Feb 12, 2004 at 00:33 UTC
    Only if you're guaranteed to have exactly one digit after the desired three.

    Update in response to someone else's update: Aliens must have inserted that sprintf when I wasn't looking.