Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: Secret Perl Operators: the boolean list squash operator, x!! (grep disqualified?)

by tye (Cardinal)
on Aug 02, 2006 at 16:21 UTC ( #565257=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $name = join '-', @prefix, ( defined $path and length $path ) ? ( s
    +plit /:/, $path ) : (), $suffix;
    
  2. or download this
    ( LIST ) x!! COND
    ( grep COND, LIST )
    COND ? ( LIST ) : ()
    
  3. or download this
    my $name = join '-',
        @prefix,
        ( grep { defined $path and length $path } split /:/, $path ),
        $suffix;
    
  4. or download this
        ( split /:/, $path || '' ),
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://565257]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2015-07-30 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls