Is it possible to pass a block of code to a sub using "parentheses" syntax?
I.e. when i write
List::MoreUtils::any { defined ($_) } (undef, undef, 1);
it works. But when i try to add parentheses
List::MoreUtils::any ( { defined ($_) } , (undef, undef, 1) );
this is interpreted as an anonymous hash, giving an error message. Neither escaping nor using eval helps.
The idea behind all the fuss is if the call is a part of an expression, i.e.
if (first_index { defined (${$_})} $jms_positions > $jms_positionals_seen )
some operator following the arguments might be executed before the call, producing an undesired result.