Try adding
use strict; use warnings;
at the top of your program. They'll point out many errors in your program.
Update:
$atob is -2.5
$btoc is -0.5
$atoc is -3
That's why the first elsif isn't executed: $btoc > 1 || $btoc < -1 is false.
In reply to Re: if logic OR parentheses problem
by FunkyMonk
in thread if logic OR parentheses problem
by Ellhar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |