in reply to Subtracting Stringified Negative Numbers
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Subtracting Stringified Negative Numbers (Data::Dumber)
by tye (Sage) on Jun 22, 2007 at 05:27 UTC | |
by monkfan (Curate) on Jun 22, 2007 at 08:47 UTC | |
by BrowserUk (Patriarch) on Jun 22, 2007 at 16:43 UTC |