Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 imbibing at the Monastery: (5)
As of 2014-12-28 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (181 votes), past polls