Hmmm... when I tried your code it worked just fine and $dif had the value of 106. What version of Perl are you using? What is the actual context of the code?
Not knowing the context, you might consider doing something like:
to force the strings into integers. But I'm thinking there's something else going on. Additional context would definitely help.my $dif = ( int $n1 ) - ( int $n2 );
perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'
In reply to Re: Subtracting Stringified Negative Numbers
by agianni
in thread Subtracting Stringified Negative Numbers
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |