Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Adding hash values together

by trammell (Priest)
on Jun 30, 2005 at 17:30 UTC ( [id://471401]=note: print w/replies, xml ) Need Help??


in reply to Adding hash values together

Seems to behave correctly for me:
#!perl -l use strict; use warnings; my %hash; my $string = '2e-149'; $hash{foo} = 1e-149; print "\$hash{foo} = $hash{foo}"; $hash{foo} += $string; print "\$hash{foo} = $hash{foo}"; $string = '2e-36'; $hash{foo} += $string; print "\$hash{foo} = $hash{foo}"; __END__ $hash{foo} = 1e-149 $hash{foo} = 3e-149 $hash{foo} = 2e-36

Log In?
Username:
Password:

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

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

    No recent polls found