Hi Bryan Harris -
  
At 2005-12-03, 19:19:02 you wrote:
>
>
>I just ran into this today, and have no clue what's going on:
>
>% perl -e 'print 10-5.5, "\n"'
>4.5
>% perl -e 'print 10-05.5, "\n"'
>55
>
>How does 10 minus 5.5 equal 55?  Obviously it's the leading zero, but I
>can't think of any reason why it should do that...
>
>- B
>

It seems that 05 is taken as octal (leading zero literals are octal),
and there not being an 'octal' point supported, '.' is takee as a concat. so :

decimal 10 - octal 5( which is decimal 5 also ) = 5 conat 5 => 55
                        
Aloha => Beau;
[EMAIL PROTECTED]
2005-12-03



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


Reply via email to