Keep It Simple, Stupid | |
PerlMonks |
Subtraction by digitby zli034 (Monk) |
on Feb 11, 2008 at 08:51 UTC ( [id://667345]=perlquestion: print w/replies, xml ) | Need Help?? |
zli034 has asked for the wisdom of the Perl Monks concerning the following question: Say there are two integers of scalar. I want to substract them by digits. like this: 1,2,3,4,5,6 - 2,9,8,4,7,6 = -1,-7,-5,0,-2,0 When I tried it, I split the two scalars in to 2 arrays of single digits, then performed digit substract. However the results are float numbers. Appreciate any good suggestions. Update ###################################
Back to
Seekers of Perl Wisdom
|
|