A few comments about this code (which is derived from the old code):

On Tuesday 21 September 2010 08:40:41 Jon Hermansen wrote:
> Hi Abu,
>  This code works for me:
> 
> #!/usr/bin/perl
> 

Add strict and warnings:

http://perl-begin.org/tutorials/bad-elements/

> my $d1, $d2, $sum;

If you did, you know you would have to do:

my ($d1, $d2, $sum);

Although doing my $d1 = ...; my $d2 = ... is better.

> 
> $d1 = 6.892964 * 10 ** -309;
> $d2 = 1.102874 * 10 ** -307;
> 

Generally, the m * 10 ** e notation is not needed, but it seems to be a bug in 
perl 5. I'll consult the perl5-porters about it.

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://shlom.in/enemy

<rindolf> She's a hot chick. But she smokes.
<go|dfish> She can smoke as long as she's smokin'.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to