in reply to Re: Multiple Conditional Statements
in thread Multiple Conditional Statements
If you like a more direct approach,
That's a perfectly valid approach, but how is it "more direct"? (And "more direct" that what for that matter?)
You have:
- An auxiliary boolean variable;
- An auxiliary array (... of references which have to be taken);
- Two nested loops;
- A callback function (from a module);
- An array slice;
- n(n+1) dereferences;
- n(n+1)/2 comparisons;
- And it doesn't even short-circuit if the first two variables compared are the same.
That's the strangest definition of "more direct" I can think of :)
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom