foreach (@rebasefile[10..$#rebasefile]){ # skips the first ten automatically next if(/^\s*$/); ... }