in reply to Re: Coping with decimals
in thread Coping with decimals

If the number doesn't contain a decimal part, you could end up using $1 from a previous match. I'd suggest (maybe some parenthesis can be avoided, but I'm not able to test ATM):
$phase = '0' . (($number =~ /(\..+)/) ? $1 : '');
I found particularly wit to include the "." inside $1, in order to avoid repetition.

Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

Don't fool yourself.