|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: I don't understand this grepby toolic (Bishop) |
| on Nov 05, 2008 at 18:06 UTC ( [id://721750]=note: print w/replies, xml ) | Need Help?? |
|
I am not familiar with what grep doesAs the documentation says, grep filters a list according to a specified condition, and returns a new list, when called in a list context, as your code does. Since your sub does not have an explicit return, the sub returns what grep returns, namely a list.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||