From: [EMAIL PROTECTED]
> Hi All, i found this as a Bug in Perl
> 
> consider....
>     for($i=0;$i<0.4;$i=$i+0.1)
>      {
>         print "$i\n";
>     }
> 
> 
> here you wiil get output as expected...
>       0  to 0.3
> it work fine till test is $i<0.7...UPTO HERE EVERYTHING IS GOING
> RIGHT
> BUT magic starts here
> 
> 
>   for($i=0;$i<0.8;$i=$i+0.1)
>      {
>         print "$i\n";
>     }
> 
> 
> when i take test as $i<0.8
> output is strange...
> it is
>      0 to 0.8 isted of     0 to 0.7
> same for $i<0.9...
> thus 0.8 onwords ...less than not working as expectation.....
> 
> 
> it is working as <=

See for example http://www.perlmonks.org/?node_id=293402 and 
http://www.unix.com.ua/orelly/perl/cookbook/ch02_03.htm

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to