in reply to Round numbers?

Not so easy, since your spec changes depending on whether you have 'e' (two decimal places) or not (three decimal places). Best I could come up with is:
printf ((/e/?"%04.2e":"%05.3f")."\n", $number);
Use sprintf if you wish to convert the number and place into another variable:
my $var = sprintf ((/e/?"%04.2e":"%05.3f"), $number);


Update: removed stupid "\n" from sprintf