The exceptional case is when you use eval
this lets you optimize and be flexible both. You can
get your $regex value as per usual, but use it
inside an eval. This can be a big win.
for ( XXX some loop ) { $patt = gen_patt( $blah); eval 'for $i ( @lines) { if ( $i =~ m/$patt/o){ process( $i); } }'; die "eval error" if $@; }
In reply to Re: Regexes and /o
by rir
in thread Regexes and /o
by l2kashe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |