while (my $data = ) { next if $data =~ /^[\pL\pN.*]/; # do something with non-rejected $data here }