in reply to Accessing this array ref.

You want to loop through the array, printing each item. Since the array is already sorted into groups, you just print a new group header when the value changes:

use feature 'say'; my $type; for my $entry (@$VAR1) { if ( $entry->{type} ne $type ) { $type = $entry->{type}; say $type; } say "\t$entry->{name} - $entry->{reference}"; }

Replies are listed 'Best First'.
Re^2: Accessing this array ref.
by Anonymous Monk on Apr 03, 2013 at 19:23 UTC
    This would do it, I could combined all the data into one variable and print at once instead of printing them in the IF, right?
      I don't understand your question. If the data is sorted as Loops said, his solution should work for you.
        I am sorry, is that at the end of processing I have to pass the values as this:
        $template->param('data', $results);