http://www.perlmonks.org?node_id=211207


in reply to Re: Record Separator affecting Regex
in thread Record Separator affecting Regex

As a note, there's a way to check for "lines which are composed only of spaces" that I find much more succinct:
print "Query: $line" if ($line =~ /\S/);
Or more generically:
next unless ($line =~ /\S/); print "Query: $line";
"Not composed entirely of spaces" is equivalent to "contains a non-space character", at least in this context.