Show me that $| can have a value other than 1 or 0 :) Same with $^W,
which has the same behavior. I can see that, in a way, it makes sense..
since $|-- would make it -1, which is a true value and since $| can
only be 1|0 it becomes 1, since that is a true value. But, I still
don't like it :) Especially with $^W.

If something isn't documented, it is either a bug or a feature, once
documented it is a feature :)

Cheers,
Kevin

On Tue, Aug 20, 2002 at 05:38:02PM -0400, Nikola Janceski 
([EMAIL PROTECTED]) said something similar to:
> 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]

-- 
[Writing CGI Applications with Perl - http://perlcgi-book.com]
"As the fletcher whittles and makes straight his arrows, so the master directs
his straying thoughts." 
        -- Buddha

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to