Chris Spurgeon <[EMAIL PROTECTED]> writes:

> A zillion ways.  One is 
> 
> $length = scalar(@thearray);

Which reduces to:

$length = @thearray

The assignment operator supplies the scalar context.  The
scalar pseudo-function is therefore not needed.

OTOH

print scalar @thearray;

The scalar *is* necessary since print would otherwise
provide a list context.

-- 
Michael R. Wolf
    All mammals learn by playing!
       [EMAIL PROTECTED]


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

Reply via email to