Some code would have been nice, but you can try push( @c, shift(@a) - shift(@b)) while (@a and @b); It is destructive, but @c will contain the results when it is done and it.
or a non-descructive version $c[$_] = $a[$_] - $b[$_] for 0 .. ($#a < $#b ? $#a : $#b);, but I think the first is easier to read. ;)
Updated thanks to some comments from ysth regarding precedence and a typo )
In reply to Re: Subtraction by digit
by eric256
in thread Subtraction by digit
by zli034
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |