--- "F.H" <[EMAIL PROTECTED]> wrote:
> Hi There,
> I am trying to get a count of elements of a reference to an array.
> $reftest = \@test
> $#reftest, doesn't seem to yield the number of arry elements.
> I appreciate if someone can help
> Thanks
> I.S
In any event, "print $#test" will print the value of the last index, which is the
number of
elements minus one. If you want the number of elements from a reference, you can do
this:
print $#$reftest+1;
Or
print scalar @$reftest; # yuck
Cheers,
Curtis "Ovid" Poe
=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]