H
Hal Vaughan
I have a function that I'm using to perform operations on strings in an
array. There are times where I'd like to have this function work on arrays
of arrays. Is there a simple way to tell if the value of an element in an
array is a scalar, or is, instead, a reference to another array?
I know I can use a regex to see if the string matches the pattern for an
array reference, but is there a more "elegant" and easier way to do it?
(And, while I'm at it, is there a way to check for a hash as well? I'd
think they'd both be done the same way.)
Thanks!
Hal
array. There are times where I'd like to have this function work on arrays
of arrays. Is there a simple way to tell if the value of an element in an
array is a scalar, or is, instead, a reference to another array?
I know I can use a regex to see if the string matches the pattern for an
array reference, but is there a more "elegant" and easier way to do it?
(And, while I'm at it, is there a way to check for a hash as well? I'd
think they'd both be done the same way.)
Thanks!
Hal