On Fri, Jun 22, 2001 at 05:33:48PM -0400, Brett W. McCoy wrote:
> But then it should be list(), not array(). There is list context and
> scalar context, but not array context. Anyway, () is usually enough to
> force a list context, if appropriate (we saw yesterday a case where it
> doesn't). scalar() was created because there was no operator
> already to force a scalar context.
There have been numerous discussions on various Perl lists about a
counterpart to scalar to force list context, but the people that want that
operator nearly always want it to count the number of elements in a list. A
list in scalar context, as I previously mentioned, does not evaluate to the
number of elements in the list; this is a special property of arrays and
list assignment.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--