in reply to Re: Using grep to remove array element from HoAoH leaving empty array-hash element
in thread Using grep to remove array element from HoAoH leaving empty array-hash element

I think you're on to something with 2 and 3. Take a look at my reply and you'll see the Data::Dumper results. I'm getting an empty hash after the grep which appears to be appended to the end of the array. I think that is where grep is throwing the error, but I'm stumped on how to rectify that.

Useless trivia: In the 2004 Las Vegas phone book there are approximately 28 pages of ads for massage, but almost 200 for lawyers.
  • Comment on Re^2: Using grep to remove array element from HoAoH leaving empty array-hash element

Replies are listed 'Best First'.
Re^3: Using grep to remove array element from HoAoH leaving empty array-hash element
by ikegami (Patriarch) on Aug 11, 2004 at 05:23 UTC
    It's not the 'after' that's important. The warning is your grep condition telling you the data is wrong (i.e. different than expected) before grep is called. Data::Dumper shows us this bad data: the extra "{}" at the end of the list in the 'before' dump. What you must do now is figure out how that extra (fieldless) record is being added to your 'database'.