http://qs1969.pair.com?node_id=11115830


in reply to Re: Growing strings in search
in thread Growing strings in search

One precompiles an expression using qr// to avoid repeated compilations later.
my $RE = qr/foo.+?bar/; foreach (@str) { warn "Huzzah! $str" if m/$RE/; }

--
In Bob We Trust, All Others Bring Data.