Syntactic Confectionery Delight | |
PerlMonks |
Re: Alternation vs. looping for multiple searches.by aquarium (Curate) |
on Nov 21, 2010 at 22:15 UTC ( [id://872820]=note: print w/replies, xml ) | Need Help?? |
there's always another way...you could construct and then eval code that tests the regexes one by one in sequence, shortcircuiting on first match found. you'd usually arrange to have the most common case first and least common case last, so that it short circuits at earliest opportunity.
the hardest line to type correctly is: stty erase ^H
In Section
Seekers of Perl Wisdom
|
|