sub db_get { .. .. # fetch the rows into an array reference while ( $retstat = $sth->fetchrow_hashref ) { push @retval, [$retstat]; } .. .. return @retval } #### my $value = $ary[0][0]->{} # to Shorten it (so it's not so hard to type) my %short = %{$ary[0][0]};