$temp = SelectedRecords(); foreach (keys %{$temp}){ $curRecord{$_} = $temp->{$_}; }