And it's fast enough for me, but it has me wondering: is it faster to use elsif for this, or to just chain the statement into a whole pile of if statements?if($arg) { if($arg eq '1') { } elsif($arg eq '2') { } elsif($arg eq '3') { } } else { # error }
In reply to Regarding speed: Is elsif or just if faster? by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |