[sf-perl] Re: [oak perl] print Dumper \$|;

qw at sf.pm.org qw at sf.pm.org
Wed Jan 15 19:38:40 CST 2003


Oops, I forgot to CC Oakland.pm.  Please reply-all to this message,
not the previous one, to include them.

That's confusing.  I first thought maybe $| was a tied variable, which
would explain this behavior.  So, I tried doing 'tied $|' to see what
it was tied to.  The result was undef--meaning it's not a tied.  But,
wait, 'tied %ENV' also returns undef.  Does anyone know why?  Is this
a bug?  (All of this is in Perl 5.6.1 on Solaris.)

Anyway, I guess the larger moral of this story is that $| has a
Boolean value, and you should only think of it in terms of true
(nonzero) or false (zero), and not do math operations on it.  Why
would you want to increment $|, anyway?

---
qw (Quinn Weaver); #President, San Francisco Perl Mongers
=for information, visit http://sf.pm.org/ =cut



More information about the Oakland mailing list