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

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

by Aristotle (Chancellor)
on Jul 31, 2006 at 21:16 UTC ( #564874=note: print w/ replies, xml ) Need Help??


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

How does that work out if $is_admin_link is either 0 or 1, but never undefined?

Makeshifts last the longest.


Comment on Re^2: Secret Perl Operators: the boolean list squash operator, x!! (grep)
Re^3: Secret Perl Operators: the boolean list squash operator, x!! (grep)
by tye (Cardinal) on Jul 31, 2006 at 21:25 UTC

    $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        

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (18)
As of 2014-04-16 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (430 votes), past polls