Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
G'day powerin, Welcome to the Monastery. Firstly, here's a cut-down version of what you're doing. This is just to make subsequent examples more succinct.
"So, "Still here #1" is never shown." No, it won't be. You're returning from &working before the print statement is reached. You can confirm this by checking the return value.
Removing the return statement from the original code gives the result you seem to be after.
Calling either the builtin grep, or your custom mygrep, in void context, is highly questionable. I wonder whether this is really what you're trying to do, or if this was maybe just an example of what you want. Perhaps describing your actual intent, possibly with just pseudocode, will elicit better answers. — Ken In reply to Re: Bare BLOCK vrs. grep BLOCK
by kcott
|
|