my $temp_2 = "foo"; my $temp_3 = "bar"; for ($i = 2; $i < 4; $i++) { print ${"temp_$i"},"\n"; }