|
|
| We don't bite newbies here... much | |
| PerlMonks |
What is <CODE>/o</CODE> really for?by faq_monk (Initiate) |
| on Oct 08, 1999 at 00:25 UTC ( #664=perlfaq nodetype: print w/ replies, xml ) | Need Help?? |
|
Current Perl documentation can be found at perldoc.perl.org. Here is our local, out-dated (pre-5.6) version:
Using a variable in a regular expression match forces a re-evaluation (and
perhaps recompilation) each time through. The
Use of
For example, here's a ``paragrep'' program:
$/ = ''; # paragraph mode
$pat = shift;
while (<>) {
print if /$pat/o;
}
|
|