http://www.perlmonks.org?node_id=1053508


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:

  1. An auxiliary boolean variable;
  2. An auxiliary array (... of references which have to be taken);
  3. Two nested loops;
  4. A callback function (from a module);
  5. An array slice;
  6. n(n+1) dereferences;
  7. n(n+1)/2 comparisons;
  8. 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.