in reply to Re: unexpected STDIN
in thread unexpected STDIN
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: unexpected STDIN
by AnomalousMonk (Archbishop) on Apr 30, 2011 at 14:13 UTC | |
by GhodMode (Pilgrim) on Apr 30, 2011 at 14:28 UTC | |
|
Re^3: unexpected STDIN
by locked_user sundialsvc4 (Abbot) on Apr 30, 2011 at 12:19 UTC |