use strict; use warnings; my @test_num_tgb = qw/a b c d/; for (my $j=1;$j<=$#test_num_tgb;$j++) { print $test_num_tgb[$j]; print "\n"; }