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


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

Yeah, I think you have the right idea here, Bird. Better than mine, under the circumstances.

I'd probably rework it as follows, to get rid of all that extra leading whitespace:

local $/ = ";\n"; while ( <> ) { s/^#.*$//mg; # kill comments s/^\s+//; # kill all remaining leading whitespace print "Query: $_\n"; }