Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Subtracting Stringified Negative Numbers

by GrandFather (Saint)
on Jun 22, 2007 at 04:55 UTC ( [id://622716]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://622716]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-16 14:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found