in reply to Re: Negative zero? There's gotta be a sprintf that undoes that, right?
in thread Negative zero? There's gotta be a sprintf that undoes that, right?
minimal regexp work and works for any precision.$num=sprintf("%7.5f",$num); $num=~s/^-// if $num == 0 && $num lt 0;
Update Caveat... only works in locales where "-" is lower than 0-9
|
|---|