"be consistent" | |
PerlMonks |
Re: how to add more intelligence to grep functionalityby GrandFather (Saint) |
on Jan 11, 2006 at 19:42 UTC ( [id://522550]=note: print w/replies, xml ) | Need Help?? |
You have your answer, but for future reference your node would have been better if you trimmed the number of items in the array to show just enough cases to make your problem clear, and if your question matched the actual example in the code. As it stands most browsers will either break your nasty long line in a random place, or not break it at all meaning that a huge amount of scrolling is required to read your node and its replies. Even replying in such a case is a real pain in the butt because the edit box is extreamly wide. Cleaned up (and fixed) code could look like this:
Prints:
It's not clear to me why you had a grep in there. A version using grep is:
Prints:
DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|