in reply to Re: Preserving hash structure after subroutine call
in thread Preserving hash structure after subroutine call

Yes. I had used that variant earlier without the intermediate hash but with the same results. I used the intermediate hoping that the references would resolve to actual data during the assignment:
%{ $href } = %results;

In my example I tried using Storable's dclone() which I thought replace the references with the real data, but apparently not. I agree that it has something to do with scoping, I'm just not sure how to solve it.

Replies are listed 'Best First'.
Re: Preserving hash structure after subroutine call
by suaveant (Parson) on May 13, 2003 at 21:35 UTC
    well... try
    while(my $row = $sth->fetchrow_hashref() && my %row = %$row)
    or something similar. Copy the row hash.

                    - Ant
                    - Some of my best work - (1 2 3)