Thanks wind, but it's not really clear what you mean. Could you be more specific?
I think you might be referring to my placement of the parentheses and I do see the problem there. My code is actually evaluating ('y' or 'yes') first, then comparing the (boolean) result (true since 'y' is not an empty string) to the value of $answer.
This is probably better: if (($answer eq 'y') or ($answer eq 'yes')){
I caught that one on my own, but I hadn't gotten to that point yet when I asked the question. I wasn't even getting prompted for the info when I asked the question because it was using the file from the command line instead of <STDIN>
The thread you linked to doesn't refer to order of precedence... Did you notice another problem that I haven't seen yet?
Thank you.
|