Two tips that should help a lot.
$answer is used to hold the input, the loop counter and the result? yow! Start by using separate variables for these things.
Consider using for instead of while, since you're looping over the indexes of an array. Actually, consider using the input as an index into the array and eliminating the loop altogether.
In reply to Re: Sub Routine Malfunction
by ikegami
in thread Sub Routine Malfunction
by koolgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |