in reply to Re: do-while loop
in thread do-while loop

The inelegant part is that you have to prompt outside of the loop once, but the more elegant part is that you're actually checking whether or not there IS more input to be read. That way, should STDIN happen to run out of input (for example, in the case of the script being fed an input file instead of keyboard input, it can terminate when it runs out of lines of text to read.

I think that one could strike a balance by using

do { … } while length $reply and …
(This quits on empty input; but, then again, the original version provides no non-CTRL-C way to get out of the loop if you don't happen to remember the letters from a to d—so maybe that's a feature.)

UPDATE: Oops, my original version had while $reply and …, which quits on input 0, which seems incorrect by any measure.