in reply to Re: Re: Re: Re: Interesting Use of Grep
in thread Interesting Use of Grep
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 }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Interesting Use of Grep
by jynx (Priest) on Jun 30, 2001 at 02:59 UTC |