Re: determining size of array through reference

2004-04-09 Thread Adam
I guess you could always dereference the array then find its size. my(@sample, $ref, @de_ref); # Original array. @sample = ('sample', 'sample'); # Make reference to original array. $ref = [EMAIL PROTECTED]; # De-reference the original array. @de_ref = @$ref; # Get the size from the reference. pri

Re: determining size of array through reference

2004-04-07 Thread R. Joseph Newton
Andrew Gaffney wrote: > david wrote: > > Andrew Gaffney wrote: > > > > > >>I've got an array reference and I'm trying to figure out how many elements > >>are in it. I've tried '$#arrayref', '[EMAIL PROTECTED]', '$(@($arrayref))', and > >>probably a few others that I've forgotten. What is the corre

Re: determining size of array through reference

2004-04-07 Thread Rob Dixon
Andrew Gaffney wrote: > > david wrote: > > Andrew Gaffney wrote: > > > > > >>I've got an array reference and I'm trying to figure out how many elements > >>are in it. I've tried '$#arrayref', '[EMAIL PROTECTED]', '$(@($arrayref))', and > >>probably a few others that I've forgotten. What is the corr

Re: determining size of array through reference

2004-04-06 Thread Andrew Gaffney
david wrote: Andrew Gaffney wrote: I've got an array reference and I'm trying to figure out how many elements are in it. I've tried '$#arrayref', '[EMAIL PROTECTED]', '$(@($arrayref))', and probably a few others that I've forgotten. What is the correct way to do this? you can try @{EXP} or $#{E

Re: determining size of array through reference

2004-04-06 Thread david
Andrew Gaffney wrote: > I've got an array reference and I'm trying to figure out how many elements > are in it. I've tried '$#arrayref', '[EMAIL PROTECTED]', '$(@($arrayref))', and > probably a few others that I've forgotten. What is the correct way to do > this? you can try @{EXP} or $#{EXP}+1 w