[perl #91614] Suggestion for improving documentation of $!
authorJohn P. Linderman <jpl@research.att.com>
Wed, 25 May 2011 15:36:27 +0000 (08:36 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 25 May 2011 15:36:27 +0000 (08:36 -0700)
commita73bef781595e4d1d9c2ce5b4d4b0a845c7bfa44
tree4567ff33fd5b089e2cadc69e104b83f608c6c06d
parent7f8d58fb0a9806bbceb2f22543b4599f3d791699
[perl #91614] Suggestion for improving documentation of $!

While trying to understand a bug report at

http://www.perlmonks.org/?node_id=906466

I realized that the documentation for $! was not crystal clear.  For example

    If used numerically, yields the current value of the
    C C<errno> variable, or in other words,
    if a system or library call fails, it sets this variable.

That's not "in other words", these are totally different
concepts.  And it isn't clear whether this variable refers to
errno or $! (I assumed the latter, and was wrong, as Devel::Peek
demonstrated).  And $! cannot be undef, as asserted (later),
because errno always contains a value, however irrelevant.
pod/perlvar.pod