>>>>> "Chas" == Chas Owens <[EMAIL PROTECTED]> writes:

Chas> With the downside that you have an array that you never use.  Using ()
Chas> to force list context is one of those strange little quirks that you
Chas> just get used to.  These days I read () as the array equivalent of
Chas> scalar().

Well, there can be no "array" equivalent of "scalar".  The only place
you would use it is to provide list context to a subexpression where a
scalar context is being provided.  But then what?  You have a list,
and you have a scalar needed.  Do you want the length (like scalar @a
or scalar grep or scalar map or scalar keys)?  The first element
(scalar assignment)?  The last element (comma)?  A random element?
{grin} The second element (getpwnam)?  A single line instead of the
entire file, retaining the ability to read the rest of the file
(readline)?

There is no meaning for "list in a scalar context", so your statement
makes no sense.

That's why there's no keyword "array" like the keyword "scalar".  It
makes no sense.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

Reply via email to