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

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

by blazar (Canon)
on Jul 18, 2008 at 15:08 UTC ( #698642=note: print w/replies, xml ) Need Help??

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

To my eyes, [ $condition => $value ] reads better.

I personally believe that it's not that important: I gave a... wild shot, if you know what I mean. Of course one may want some sort of full fledged solution taking care of all possible cases. For the present situation, your expression is fine enough, but just that little much too complex wrt "mine." I may have used something like that too, of course.

However, as a sort of justification, I was thinking much of the postponed condition in analogy with an if statement modifier, that can be thought of as an optional parameter and be there or not...

Also allows you to do: [ $condition => $list, $of, $values ]

And then again, one may want to do [ $value => @conditions ] instead: again It depends on the actual situation and there's not a clear-cut, all-encompassing answer. (There may be, if we wanted to make it into a real module, with a well thought API, and so on, but that's not the case...)

If you can't understand the incipit, then please check the IPB Campaign.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://698642]
[james28909]: omg
[james28909]: im just finding out that july and august have 31 days?
[atcroft]: stevieb: Apparently it was contagious....
[atcroft]: james28909: Make both hands into fists, place them together (with thumbs concealed), and every knuckle is a month (starting with Jan.) has 31 days, every dip (between knuckles) does not....
[atcroft]: (And Feb. is the odd case, because it is 28, unless it is a year divisible by 4, or if it is divisible by both 100 and 400 (at which point it is 29).)
[james28909]: i know but scroll through your calendar on your computer.
[james28909]: i thiught you were going to say make both hands into a fist and puch yourself in the face
[atcroft]: .oO(Sorry, I probably should have said take two normal hands....)
[atcroft]: james28909: No, unless you are a politician, I wouldn't say that (and even if you are, I still probably wouldn't say that).
[james28909]: i mean how hard can it be? its just subtracting days lol

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2017-04-29 04:27 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.