Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Secret Perl Operators: the boolean list squash operator, x!!

by xdg (Monsignor)
on Jul 31, 2006 at 18:18 UTC ( #564833=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     ( 'admin'  ) x !!$is_admin_link,
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    @bar = ( 'bar', (@foo) x !!$cond, 'baz' );
    print join(q{,},@bar), "\n";
    
  3. or download this
    bar,,baz
    bar,baz