Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Subtracting Stringified Negative Numbers

by GrandFather (Sage)
on Jun 22, 2007 at 04:55 UTC ( #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
Node Status?
node history
Node Type: note [id://622716]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2018-08-16 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (171 votes). Check out past polls.

    Notices?