my @l_test = (1,2,3,4,5,6,7); my $found; foreach my $l_rec (@l_test) { $found++, next if $l_rec == 4; print $l_rec; } print qq{\nskipped 4\n} if $found;