[comp.lang.perl] why is 010.0 - 010.0000 == 720

coleman@sundae9.DAB.GE.COM (Richard Coleman) (10/17/90)

Ok, I give up, why is
010.0 - 010.0000 == 720

p.s. Anybody keeping a FAQ list.
-- 

     Richard Coleman
     G.E. Simulation & Control Systems
     coleman@sunny.dab.ge.com

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (10/17/90)

In article <6298@ge-dab.GE.COM> coleman@sunny.dab.ge.com (Richard Coleman) writes:
: Ok, I give up, why is
: 010.0 - 010.0000 == 720

(((010) . 0) - 010) . 0
((   8  . 0) - 010) . 0
(      80    - 010) . 0
	   72       . 0
	       720

The . and - operators have the same precedence, and associate left to right.

: p.s. Anybody keeping a FAQ list.

Tom is making one up.  This won't be on it.

Larry

tchrist@convex.COM (Tom Christiansen) (10/18/90)

In article <6298@ge-dab.GE.COM> coleman@sunny.dab.ge.com (Richard Coleman) writes:
>Ok, I give up, why is
>010.0 - 010.0000 == 720
>
>p.s. Anybody keeping a FAQ list.

Yes, I've got one that I'll post as soon as I get back from LISA
and Larry blesses it as no longer containing any lies.

I'm not that this is a frequently asked question.  Should it be?

We just had a full morning of perl tutorial with ~200 people here,
plus a BOF.   It seemed to over well. Amazing how little you can 
actually cover in just 3 hours.

--tom