use bigint; while(<>) { my ($a, $b)= split/ /; $a += 0; print $a - $b, "\n"; }