toadi has asked for the wisdom of the Perl Monks concerning the following question:
Now my question is: Can I be sure that one of the hash references can be overwritten by another one when declaring them at the start of the while??? And if so can I solve this problem in a better way???my @array1; while( $sth->fetch ) { my %fetch2; $fetch2{username} = $username; $fetch2{accountid} = $accountid; $fetch2{statusid} = $statusid; print "$username - $accountid - $statusid \n"; push (@array1, \%fetch2); } $fetch1{array_ref} = \@array1; return \%fetch1;
Edit kudra, 2002-05-06 Changed title
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Pushing References
by tadman (Prior) on May 06, 2002 at 14:26 UTC | |
Re: references
by BUU (Prior) on May 06, 2002 at 12:27 UTC |