You could even opt for the Perl6 style ..
use Switch 'Perl6'; given ($mystring) { when /key1/ { handle_Key1(); } when /key2/ { handle_Key2(); } when /key3/ { handle_Key3(); } default { handle anything else; } }
Have you been high today? I see the nuns are gay! My brother yelled to me...I love you inside Ed - Benny Lava, by Buffalax
In reply to Re: if or switch?
by NetWallah
in thread if or switch?
by gw1500se
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |