in reply to Re: Why is /o not listed as a modifer
in thread Why is /o not listed as a modifer

My mistake was thinking that RE/o was compiled once in its narrowest scope - that the subroutine could process 1000 files with one fixed RE, and then process another 1000 files with a different RE.

Perl does that without the 'o' modifier.

for my $re (qw( a a a b b a )) { '' =~ /$re/; }
>perl -Dr 731397.pl 2>&1 | find "Compiling REx" Compiling REx `a' Compiling REx `b' Compiling REx `a'

Notice how the regexp is only compiled whenever the interpolated variable changes. (Tested 5.6.*, 5.8.*, 5.10.0)