http://www.perlmonks.org?node_id=698498


in reply to Re: Secret Perl Operators: the boolean list squash operator, x!!
in thread Secret Perl Operators: the boolean list squash operator, x!!

Wouldn't it make more sense to have the contents of the square brackets the other way around? e.g:

@part = map defined $_->[0] ? @{$_}[(@$_>1?1:0)..$#{$_}] : (), [1 => 'http://example.net/app', 'extra'], [$is_admin_link => 'admin'], [$subsite], [1 => $mode], [$id], [$submode];

To my eyes, [ $condition => $value ] reads better.

Also allows you to do: [ $condition => $list, $of, $values ]