in reply to Re: Re: Logical Operators
in thread Logical Operators
so long as the first term in an entry in the for loop returns a boolean value, you don't need to limit yourself to strict equality operations, which is a real bonus in my eyes over the conventional switch statement found in other languages.for( $value ) { /matchthis/ and do{ something(); last;}; ($_ > 42) and do{ something_else(); last;}; default(); }
update: If you can't get it down to one variable, but can get it down to two or three, you can always put another one of these pseudo-switches inside one of the do blocks.
|
|---|