September 1st, 2000, 05:35 PM
I am working with results held in an array of hash array refs and need to know:-
a) how many refs are in the array, or
b) at least if there are ANY results in the array
Can anyone help?
September 1st, 2000, 06:40 PM
If you want to know how many refs are in the array, you can grab it with $#array to get the size of the array. That'll just tell you how many references are stored in the array (a reference is a scalar, though it may point to non-scalar data). You should probably take a look at the perldoc on references -- perldoc perlref, if I remember correctly. Also, buy a copy of Programming Perl -- there's no excuse not to, it's an absolutely excellent book -- and read chapter 4.