use strict; my @array; for (my $i = 1.5; $i < 9.4; $i += 0.1){ push(@array,sprintf("%.1f",$i)); } foreach (@array){ print "Value: $_\n"; } exit;