Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by Aristotle (Chancellor)
on Aug 02, 2006 at 14:06 UTC ( #565229=note: print w/ replies, xml ) Need Help??


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

This is basically ioannisresponse, with most repetition removed. All of the points I made in the last paragraph of my response to him apply equally to your suggestion.

Makeshifts last the longest.


Comment on Re^2: Secret Perl Operators: the boolean list squash operator, x!!
Re^3: Secret Perl Operators: the boolean list squash operator, x!!
by radiantmatrix (Parson) on Aug 02, 2006 at 14:19 UTC

    Actually, most of your objections don't seem to apply.

    1. I already include the slashes through use of $uri.="$_/"
    2. The $is_admin_link && 'admin' is in the right order already

    As for the 0/1 problem with $is_admin_link, that's a fault of my assumption that $is_admin_link would either be true or undefined. I agree, that's a bad assumption, but it's a simple fix. I would probably use a single ternary:

    $is_admin_link ? 'admin' : undef
    <radiant.matrix>
    A collection of thoughts and links from the minds of geeks
    The Code that can be seen is not the true Code
    I haven't found a problem yet that can't be solved by a well-placed trebuchet

      Read closer. I said “the last paragraph.” Here is said paragraph, in order to avoid further confusion.

      Not to mention that all of this misses my point because it’s specific to join, and I’ve needed to pass a variable list to some function or method often enough where really needed the sub-list to be empty depending on the condition – winging it by combining && and the false evaluates to the empty string factoid wouldn’t have done me any good.

      Try to simplify a different example to get closer to my point.

      Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-09-21 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (168 votes), past polls