which is invoked assub first (&@) { my $code = shift; foreach (@_) { return $_ if &{$code}(); } undef; }
-Mark# first defined value in @list $foo = first { defined($_) } @list;
In reply to Re: How do I write subs that take bare blocks as args?
by kvale
in thread How do I write subs that take bare blocks as args?
by DamnDirtyApe
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |