The first anonymous monk gave you some places to start reading, however, since it seems you need a quick answer, here it is.
Before your if statements, add the following line to get rid of unwanted white space which would make your if statements return false (I hope I said that right)...
chomp( $num1, $opt1, $num2 );
In reply to Re: calculator help
by Lady_Aleena
in thread calculator help
by Paradizingmania
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |