$n = reverse scalar sprintf("%2.4f",$n); $n =~ s/\G0//g; $n = reverse scalar $n;