foreach (@rebasefile){ next for (0..9); # of course, this has overhead of its own next if(/^\s*$/); ... }