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); }
In Section
Seekers of Perl Wisdom