in reply to Re: How to pass blocks to subroutines
in thread How to pass blocks to subroutines
Almost there. You just need to dereference $func.
Replace:
return grep $func, @$arr_ref;... with:
return grep &$func, @$arr_ref;($func is a reference, and so always true.)
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to pass blocks to subroutines
by neniro (Priest) on Jun 12, 2004 at 17:26 UTC | |
by exussum0 (Vicar) on Jun 12, 2004 at 23:57 UTC |