in reply to Re: Re: How do I write subs that take bare blocks as args?
in thread How do I write subs that take bare blocks as args?
Update:if(not grep { $_->price > 1000 } @product_list) { # do stuff }
____________my @p = (0,2,4,5,2,5,7,7); print "1: none\n" if not grep { $_ > 1000 } @p; push @p, 1002; print "2: none\n" if not grep { $_ > 1000 } @p; =output 1: none
|
---|
Replies are listed 'Best First'. | |
---|---|
A reply falls below the community's threshold of quality. You may see it by logging in. |