in reply to Re^2: How to use select
in thread How to use select
Ah, then what you want is a switch like statement .
There's a module : switch .
There's a module : switch .
Or you can do it in a great number of various ways, the most common one is using a named block with last:
update : don't try to be funky by using that switch module :) just use the if / last style ! See the answers by corion , holli and virtualsue !!SWITCH: { if (expression) { statement(s); last SWITCH; } if (expression) { statement(s); last SWITCH; } default statement(s); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: How to use select (Switch.pm considered harmfull)
by Corion (Patriarch) on Mar 05, 2005 at 13:12 UTC | |
Re^4: How to use select
by holli (Abbot) on Mar 05, 2005 at 13:21 UTC | |
Re^4: How to use select
by virtualsue (Vicar) on Mar 05, 2005 at 13:35 UTC |
In Section
Seekers of Perl Wisdom