Think about Loose Coupling | |
PerlMonks |
Re: Conditional Eliminationby RichardK (Parson) |
on Aug 30, 2011 at 11:56 UTC ( [id://923194]=note: print w/replies, xml ) | Need Help?? |
If you have a long list of items to check $p against, you could try something like
Then it's easy to add new items to the list and the code does not need to change. or you could use List::MoreUtils firstval which may be slightly more efficient if you have long lists
In Section
Seekers of Perl Wisdom
|
|