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.
In reply to Re^2: multiple regexp matches in multi line string
by ambrus
in thread multiple regexp matches in multi line string
by wirelesscharlie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |