[quote=PerlProfi,08.04.2007, 20:25]@opi, ja sorry wegen des modifiers, ich hatte einfach die regexp von goodfella genommen und in qr// geschrieben.[/quote]
kein problem... sowas hatte ich mir schon gedacht. :)
@GoodFella... ich möchte noch was hinzufügen...
Mit "ausserhalb der Schleife definieren" meinte ich nicht, dass man jede
einzelne Regex ausserhalb definieren soll. Sowas hier geht natürlich
auch:
   my $rx = /\d+/;
   for (0..100000) {
      'foo 1 bar' =~ /foo $rx bar/o;
   }
 
 
und
sub rx_best {
   for (0..100000) {
      1 =~ /\d+/;
   }
} 
 
bleibt unschlagbar ;)\n\n
<!--EDIT|opi|1176074164-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.