in reply to Re: Would you use a switch instead?
in thread Would you use a switch instead?
>perl -wMstrict -le "my $value = 'bbb'; my $foo; for ($value) { $foo = /aaa/ ? 'wanna' : /bbb/ ? 'be' : /ccc/ ? 'startin' : 'somethin' ; } print $foo; " be
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Would you use a switch instead?
by GrandFather (Saint) on Jul 04, 2009 at 22:32 UTC | |
by ysth (Canon) on Jul 05, 2009 at 08:42 UTC |