|
|
| Syntactic Confectionery Delight | |
| PerlMonks |
Re: Perl Idioms Explained: && and || "Short Circuit" operatorsby hardburn (Abbot) |
| on Oct 22, 2003 at 16:52 UTC ( [id://301362]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Now you know why Perl doesn't have a switch statement . . . It should still get one, since the advantage of C switches it that they have O(1) efficency, whereas most of the equivilent idioms in Perl have O(n) worst-case time. Fortunatly, we're getting a real switch in Perl6. ---- :(){ :|:&};: Note: All code is untested, unless otherwise stated
In Section
Meditations
|
|
||||||||||||||||||||||||