In article <042101c1b9d4$aa61b560$0701a8c0@KOLD> wrote "Kevin Old" 
<[EMAIL PROTECTED]>:

> ...
> foreach $a (@headers){
> 
>         SWITCH: {
> 
>                 if($a =~ qw/sorry/) { $sorry = 1; last SWITCH; }
>                 if($a =~ qw/kevin/) { $kevin = 1; last SWITCH; }
>                 if($a =~ qw/larry/) { $larry = 1; last SWITCH;}
>                 $nothing = 1;
>         }
> }
> 
> 
When using $_ instead of $a,
the switch reads like a real switch:

foreach (@headers) {
    SWTICH: {
         /sorry/ and $sorry = 1,last SWITCH;
         /kevin/ and $kevin = 1,last SWITCH;
         /kevin/ and $larry = 1,last SWITCH;
         $nothing = 1;
    }
}

Greetings,
Andrea

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to