If the right argument is an expression rather than a search pattern, substitution, or transliteration, it is interpreted as a search pattern at run time. This can be less efficient than an explicit search, because the pat- tern must be compiled every time the expression is evalu- ated.
This perlop text must be a holdover from a while back. At least as far back as 5.005_03, code like $str1 =~ 'bc' (with a constant string for the pattern) would be compiled only once. Between 5.6.0 and 5.6.1 an extra check was added, so that even $str =~ $str2 would not be recompiled as long as $str2 had not changed.
I guess the second statement should simply be deleted from that paragraph.
HugoIn reply to Re: Re: Regex without 'm' or '/'
by hv
in thread Am I on the pipe, or what?
by BorgCopyeditor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |