develooper Front page | perl.perl5.porters | Postings from March 2011

? remove /o reference in perlretut

Thread Next
From:
Karl Williamson
Date:
March 31, 2011 09:14
Subject:
? remove /o reference in perlretut
Message ID:
4D94A853.3050305@khwilliamson.com
perlretut introduces /o when it wrongly claims that in

     $pattern = 'Seuss';
     while (<>) {
         print if /$pattern/;
     }

the regex is recompiled each time through the loop.

There are occasions to use /o, but I'm not sure they belong in an 
introduction.

Comments?

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About