in reply to Re: Grouping an array of hashrefs by similar key values
in thread Grouping an array of hashrefs by similar key values

Thanks for the reply ikegami - very useful.

I ended up using your third method in the end. May I ask what the 'local *item' actually means though? Other than that bit of code I understand what it does.
  • Comment on Re^2: Grouping an array of hashrefs by similar key values

Replies are listed 'Best First'.
Re^3: Grouping an array of hashrefs by similar key values
by ikegami (Patriarch) on Jan 29, 2009 at 19:35 UTC
    It aliases $item to $items{ $row->{item_key} }. Changes to one affect both. I could have done $item_ref = \( $items{ $row->{item_key} } );, but it made the subsequent code rather messy (but not as much as using neither).