c:\@Work\Perl\monks>perl -wMstrict -le "my @SlectedColumns = (9, 7, 6, 0, 5, 0, 4, 3, 2, 0, 1, 9, 9); my $end_index = 10; ;; COLUMN: for my $col (@SlectedColumns[1 .. $end_index]) { next COLUMN unless $col != 0; print qq{do something with col $col}; } " do something with col 7 do something with col 6 do something with col 5 do something with col 4 do something with col 3 do something with col 2 do something with col 1