runs faster thanif ($a eq "simple value") { ... }
The point is to avoid using regular expressions on simple string testing. Any bit of speed increase in perl is good, especially when it has to be evaluated countless times.if ($a =~ /^simple value$/) { ... }
In reply to Re: Re: Re: Simple Switch statement
by Roger
in thread Simple Switch statement
by knexus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |