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


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

Actually, most of your objections don't seem to apply.

  1. I already include the slashes through use of $uri.="$_/"
  2. The $is_admin_link && 'admin' is in the right order already

As for the 0/1 problem with $is_admin_link, that's a fault of my assumption that $is_admin_link would either be true or undefined. I agree, that's a bad assumption, but it's a simple fix. I would probably use a single ternary:

$is_admin_link ? 'admin' : undef
<radiant.matrix>
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
I haven't found a problem yet that can't be solved by a well-placed trebuchet