Thank you so much!!! I could not hold to check things for myself. Satya::Novice_City;
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #"There is no other thing in this world comparable with Guru (the spiritual mentor); for the science of alchemy can just change iron to gold - a true Guru #changes his subjects into another Guru of his stature" - Sankara (Monist who lived in ancient India) "Rob Dixon" <[EMAIL PROTECTED] To: [EMAIL PROTECTED] am.co.uk> cc: Subject: Re: Passing array to a function 12/20/2002 05:13 PM "Rob Richardson" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Rob, > > I will take your word that "$a = (3, 2, 1);" returns 1. I think I was > thinking of "$a = [3, 2, 1];", in which an anonymous array would be > created and $a would return 3, the number of elements in the array. > > NOT!!! > Carry on answering your own questions like that and you'll put me out of my night job :) > > The above is what I was going to say when I started typing this, but > then I remembered. In "$a = [3, 2, 1];", $a gets a reference to the > anonymous array. I was going to finish this thought with a way to get > the number of elements in the anonymous array, but I realized I don't > know how! Also, this question could be important in my current > project. What's the best way to find the number of elements contained > in an anonymous array to which you have a reference? > $a is the array reference @$a is the array @$a+0 (or scalar @$a if you prefer) is the number of elements > > Thanks yet again! > UR welcome /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]