Here's a thought. Wouldn't this be cool (see below)? The idea is that in
Perl 6 you should be able to read from a file handle one character or one
line at a time (just like you can in Perl 5) BUT if you just go ahead and
use the filehandle, directly, in a scalar context then perl will read it in
as a string most efficiently, and allow you to perform your rgex, or
whatever without creating a temporary variable just to hold the contents of
that file.
open FH, $filepath;
($found) = FH =~ /pattern/;
print $found;
#or just
print FH;
#or, for example
@things = split /delimiter/, FH;
And how would s// work, I wonder? Hmmm... something to think about! Anyone
one smarter than me (includes nearly all of you) have a thought on this?
--Michael