Path: utzoo!utgpu!news-server.csri.toronto.edu!me!eastick Newsgroups: comp.lang.perl From: eastick@me.utoronto.ca (Doug Eastick) Subject: Re: Does it have to be like this? Message-ID: <90Oct12.181413edt.21973@me.utoronto.ca> Keywords: octal Organization: University of Toronto, Department of Mechanical Engineering References: <1990Oct12.060936.7501@athena.mit.edu> <9951@jpl-devvax.JPL.NASA.GOV> Date: 12 Oct 90 22:14:25 GMT lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: >: $x = 010.; >: is a syntax error. >: >: PS: To explain for the the confused: a leading 0 on an integer >: indicates that the number is in octal, e.g. '077'. When perl 3.0/28 >: sees '010', it's taken to be 8 so (010 < 10). Ok, so far so bad. But >: (correct me if I'm wrong, Larry) 010.0 is parsed as the numbers 8 and >: 0, with the '.' indicating a string concatenation, so 010.0 is 80 and >: (010.0 > 10). >Right. I suppose I should point out that you're the first person to point >this out. Obviously not a major malfunction... Hey, other perl users: do you sometimes shake your head REAL fast after reading stuff like this? But I guess thats why perl is so damn interesting. >Larry I've meant to say this for a long time. Larry, you're warped. But it's a good kind of warped, if you know what I mean. Keep up the confusing work and one-line answers (I especially liked the one-liner to the XXencode subject). ...now if I could only get 3.0/28 to work on IRIX 3.3.0.