It works for me,
Your error messages say directly that you have more characters than minus, plus and digits in your argument variables. The presence of "^\" at the start of each string is causing the problem, making the strings not look like numbers.$ perl -w -e'my$n1="-933";my$n2="-1039";my$dif=$n1-$n2;print $dif,$/' 106 $
Figure out how the spurious characters are getting in and you'll find the solution.
After Compline,
Zaxo
In reply to Re: Subtracting Stringified Negative Numbers
by Zaxo
in thread Subtracting Stringified Negative Numbers
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |