--- Collin Rogowski <[EMAIL PROTECTED]> wrote:
> You get the size of an array by using it in a scalar context.
> $size = @a;

This is entirely correct.
But for those of you who prefer a more explicit syntax, you can put any
expression into scalar context with the "scalar" keyword. For my own
tastes, I'd do that, and add a comment just for clarity:

 my $size = scalar @A; # $size now number of elems in @A



=====
print "Just another Perl Hacker\n"; # edited for readability =o)
=============================================================
Real friends are those whom, when you inconvenience them, are bothered less by it than 
you are. -- me. =o) 
=============================================================
"There are trivial truths and there are great Truths.
 The opposite of a trival truth is obviously false.
 The opposite of a great Truth is also true."  -- Neils Bohr

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to