You could try something using the:
$` ($PREMATCH) and $´ ($POSTMATCH)
operators.
So he should slurp in the whole file all at once into a string and apply a match to it. Then seems like you're suggesting he will have to
open my $postmatch, '<', \$' or die $!;
and search while(<$postmatch>) (or to use some trick along these lines). Very, very smart indeed... |