It's not a bug as I see it. You gurus must have told the compiler that $| can only hold a 0 or 1 for whatever reason;
Just because something isn't documented, doesn't make it a bug. But even in the docs it tells you, "The following names have special meaning to Perl." Translation: "Don't do crap with it, unless it's for it's special purpose." > -----Original Message----- > From: John W. Krahn [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 20, 2002 5:22 PM > To: [EMAIL PROTECTED] > Subject: Re: newbie question > > > Kevin Meltzer wrote: > > > > I'm curious as to why. When I mentioned it on channel, a few people > > didn't see it as a bug either, at first. Being that it is > using -- in a > > way which isn't consistent with -- (it increments as opposed to > > decrement). In fact, it isn't just with --/++ but + and - will yield > > the same results. Anyways, just curious why you think that > subtracting > > from 0 yields a 1 doesn't seem like a bug (and when adding 1 never > > yields a 0). > > Well, because Perl has lots of special cases like this. Most people > don't ever use $| let alone the special properties of $|--. > The average > programmer just needs to know that setting $| to 1 turns on autoflush > and setting $| to 0 turns off autoflush. What about the fact that ++ > will increment a string but -- will not decrement it? > ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]