more useful options | |
PerlMonks |
Re: Print only the matched line when process line by line from a fileby davido (Cardinal) |
on Mar 21, 2018 at 19:10 UTC ( [id://1211450]=note: print w/replies, xml ) | Need Help?? |
So the question is how to put more than one condition into the initial if()?
Or in this case you could leverage the power of alternation within the regular expression:
If the behavior is supposed to differ based on what matched, you could also do this:
Dave
In Section
Seekers of Perl Wisdom
|
|