Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Subtracting Stringified Negative Numbers

by monkfan (Curate)
on Jun 22, 2007 at 04:07 UTC ( #622704=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $n1 = '-933';
    my $n2 = '-1039';
    
    my $dif = $n1 - $n2;
    
  2. or download this
    $VAR1 = '-933';
    $VAR1 = '-1039';
    
  3. or download this
    Argument "^\-933" isn't numeric in subtraction (-) at mycode.pl line 1
    +15.
    Argument "^\-1039" isn't numeric in subtraction (-) at mycode.pl line 
    +115.
    
  4. or download this
    my $some_string = "0,-933";
    my ($id1,$n1) = split(",",$some_string);
    
  5. or download this
    This is perl, v5.8.5 built for i386-linux-thread-multi
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://622704]
Approved by naikonta
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2018-07-15 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (326 votes). Check out past polls.

    Notices?