That is odd, because this is a fairly common structure using do and last to emulate a switch statement. I use it all the time and have had no problems with it:
for( $test_value ) { /pattern1/ and do { something; last; }; /pattern2/ and do { something else; last; }; do { default action; #no last required }; }
In reply to Re: Re: Re: Re: Re: Interesting Use of Grep
by AidanLee
in thread Interesting Use of Grep
by AidanLee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |