http://www.perlmonks.org?node_id=622716


in reply to Subtracting Stringified Negative Numbers

Perhaps you could show us an actual runnable sample that demonstrates the problem? You could start by modifying the following to the point where it doesn't work any more:

use strict; use warnings; my $some_string = "0,-933"; my ($id1, $n1) = split(",",$some_string); my $dif = $id1 - $n1; print $dif;

Prints:

933

DWIM is Perl's answer to Gödel