|
|
| "be consistent" | |
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
I think your first example would be more useful if you just printed the value of $i on every iteration. I don't have perl 5.10 handy myself.
This does seem like odd behavior. No switch/select I'm familiar with (I admit that's not many) tries to match multiple cases/whens. Obviously in C the limitations of case tests to simple constants would make that behavior silly. A switch group is generally used as a prettier form of a series of if/elsif/.../else statements. The Perl implementation of continue seems to just change the next elsif to a plain if. And in that case, why not just use a plain if? I'd like to see an example of how this behavior was expected to be used. sas In reply to Re: Perl 5.10 given/when tricks and caveats
by sasdrtx
|
|