more useful options | |
PerlMonks |
Re: regex alternationby AlexTape (Monk) |
on Sep 30, 2011 at 10:32 UTC ( [id://928739]=note: print w/replies, xml ) | Need Help?? |
at first it will be a bit faster if you dont use an alias for $_. perhaps try map to increase the speed.. i´m intrested too in this case.. probably there is a solution via hashing.. u need exactly match||no match prints? or you "only" need the matched lines? <= if so it can be done faster 4 sure.. futhermore check: How do I optimize a regular expression? and Perl regexp matching is slow??
$perlig =~ s/pec/cep/g if 'errors expected';
In Section
Seekers of Perl Wisdom
|
|