Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by tye (Sage)
on Aug 02, 2006 at 16:21 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://565257]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found