Your chooser() verification is incorrect. Simpler to do a numeric range check:
redo unless $selection > -1 and $selection < @instances;
Your code would benefit from tightening the scope of lexical variables. $selection should be lexical within sub chooser, and a reference to the @instances array should be an argument to it.
After Compline,
Zaxo
In reply to Re: Regex not working?
by Zaxo
in thread Regex not working?
by peschkaj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |