If I were to use the following to check for a default answer:
$answer ||= $default;
That will likely not differentiate if the user were to enter an equivalent "false" value (like "0"). Which may not be desired behavior depending on what the question was. Also, is using the two lc()'s more efficient then the regexp? (Not that speed is a big factor in this situation)
And don't forget if someone wants to do:
query("Make a decision!", "yes/no", @choices); #see snippet for @choices
Although that could be easily done in the prompt string. :D
----------------
BP -
DG -
WB