---------------------------------------------------------------------- ^ the beginning of the string ---------------------------------------------------------------------- 0 '0' ---------------------------------------------------------------------- . any character except \n ---------------------------------------------------------------------- 00000 '00000' ---------------------------------------------------------------------- #### use warnings; use strict; my @cols = qw(3.456 8.903 1.223); @cols = map { sprintf '%8.1f', $_ } @cols; print "@cols\n"; __END__ 3.5 8.9 1.2