if( sub{ $_ == $wanted and return 1 for @ary; 0 }->() ) { say "match" }