in reply to Re: multiple regexp matches in multi line string
in thread multiple regexp matches in multi line string

I don't know where you heard about: my $lines = do { local $/; <STATFILE> }; , but that uses two relatively rare constructs in the same statement! It is highly likely that you can write Perl code for a number of years and never need either "do" or "local".
That's a common idiom mentioned in perlfaq5 under the question "How can I read in an entire file all at once?". A Super Search confirms that this idiom is quite popular and well-known.

Replies are listed 'Best First'.
Re^3: multiple regexp matches in multi line string
by Marshall (Canon) on May 10, 2010 at 12:38 UTC