sorting pathnames by basename

John Abreau jabr at blu.org
Thu Aug 22 01:38:45 EDT 2002


mike ledoux <mwl+gnhlug at alumni.unh.edu> writes:

> I see this sort of claim fairly frequently from the Perl crowd, usually
> accompanied by 'everything you need to know is in perldoc'.  Yet every
> time I need to figure out what one of these obscure no-letter variables
> does, perldoc falls down:
> 
> 	mwl at voyager:~>perldoc '$|'
> 	No documentation found for "$|".

perldoc gives you documentations for perl modules. "$|" is not a module.
These variables are documented in the man pages:

    jabr at vishnu:~ $ man perl
    PERL(1)          Perl Programmers Reference Guide         PERL(1)

    NAME
       perl - Practical Extraction and Report Language
    ....
           For ease of access, the Perl manual has been split up into
           several sections:

               perl                Perl overview (this section)
               perlfaq             Perl frequently asked questions
               ....
               perlvar             Perl predefined variables

    jabr at vishnu:~ $ man perlvar
    PERLVAR(1)       Perl Programmers Reference Guide      PERLVAR(1)

    NAME
       perlvar - Perl predefined variables

    DESCRIPTION
       Predefined Names

       The following names have special meaning to Perl.  Most
       punctuation names have reasonable mnemonics, or analogs in
       the shells.  Nevertheless, if you wish to use long vari-
       able names, you need only say

           use English;

       at the top of your program.  This will alias all the short
       names to the long names in the current package.  Some even
    ....

       autoflush HANDLE EXPR
       $OUTPUT_AUTOFLUSH
       $|      If set to nonzero, forces a flush right away and
               after every write or print on the currently
               selected output channel.  Default is 0 (regardless
               of whether the channel is really buffered by the
               system or not; "$|" tells you only whether you've
               asked Perl explicitly to flush after each write).
               STDOUT will typically be line buffered if output
               is to the terminal and block buffered otherwise.
               Setting this variable is useful primarily when you
               are outputting to a pipe or socket, such as when
               you are running a Perl program under rsh and want
               to see the output as it's happening.  This has no
               effect on input buffering.  See the getc entry in
               the perlfunc manpage for that.  (Mnemonic: when
               you want your pipes to be piping hot.)


-- 
John Abreau / Executive Director, Boston Linux & Unix 
ICQ 28611923 / AIM abreauj / JABBER jabr at jabber.org / YAHOO abreauj
Email jabr at blu.org / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99

   Some people say, "The enemy of my enemy is my friend."
   I often respond, "When elephants fight, it's the grass
   that gets trampled."



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 344 bytes
Desc: not available
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20020822/d6f9e980/attachment.bin


More information about the gnhlug-discuss mailing list