in reply to Re: Repeating an input prompt
in thread Repeating an input prompt

Thanks for the critique. I don't quite understand this line, though:
until $selection >= 1 && $selection <= @$drinks_ref;
Wouldn't that always be true if you input 1 - 4 ? Can you elaborate on that a little? thanks.

Replies are listed 'Best First'.
Re^3: Repeating an input prompt
by jwkrahn (Abbot) on Nov 29, 2008 at 02:36 UTC

    I put that in to verify that the selection was a number in the range 1 - 4.

      Got it. When I first looked at it, I was thinking the do..until loop was still controlling the 'outer' loop..like in my original code. Now I see that you moved that to a while loop.