#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Luxembourg
    Posts
    89
    Rep Power
    14
    Hi

    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?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    81
    Rep Power
    14
    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.

IMN logo majestic logo threadwatch logo seochat tools logo