Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Standard form

by dorko (Parson)
on Apr 20, 2005 at 13:29 UTC ( #449589=note: print w/replies, xml ) Need Help??


in reply to Standard form

I think you can't find anything because Perl is smart enough to "Do What You Mean" (tm).
#!/usr/bin/perl use strict; use warnings; use diagnostics; my ($number1, $number2, $number3) = <DATA>; my $number = 5.13E-04; my $other = "5.13E-04"; print "sum 1 = ", $number + $other; print "\n"; print "sum 2 = ", $number1 + $number2 + $number3; __DATA__ 5.12E-04 5.12E+04 1
Results:
sum 1 = 0.001026 sum 2 = 51201.000512

Cheers,

Brent

-- Yeah, I'm a Delt.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://449589]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2018-02-24 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (310 votes). Check out past polls.

    Notices?