@array = 0..100; foreach $item (@array){ $item += 10 if $item <100; } print join "\n", @array; #prints the numbers 10 to 109 and 100