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


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

$is_admin_link isn't in your list so it being defined doesn't matter. The second part of my node addresses most of your example while the first part of my node addresses the $is_admin_link part:

my $uri = join '/', grep defined $_, 'http://ex­ample.net/­app', ( grep $is_admin_link, 'admin' ), $subsite, $mode, $id, $submode;

- tye        

  • Comment on Re^3: Secret Perl Operators: the boolean list squash operator, x!! (grep)
  • Download Code