[Pdx-pm] evil @ARGV syntax

Michael G Schwern schwern at pobox.com
Tue Jul 19 21:41:37 PDT 2005


On Tue, Jul 19, 2005 at 07:51:39PM -0700, Michael Rasmussen wrote:
> And perlvar is silent on this aspect of Perl.

It also doesn't say much about regular expressions, threading, 
object-oriented programming or EBCDIC.

NAME
       perlvar - Perl predefined variables

DESCRIPTION
       Predefined Names

       The following names have special meaning to Perl.

Ya got the wrong man page.  I think you want perldata or perlintro.

           You might be tempted to use "$#array + 1" to tell you how many
           items there are in an array.  Don't bother.  As it happens, using
           @array where Perl expects to find a scalar value ("in scalar con-
           text") will give you the number of elements in the array:

               if (@animals < 5) { ... }


-- 
Michael G Schwern     schwern at pobox.com     http://www.pobox.com/~schwern
'All anyone gets in a mirror is themselves,' she said. 'But what you
gets in a good gumbo is everything.'
	-- "Witches Abroad" by Terry Prachett


More information about the Pdx-pm-list mailing list