In article <Lg****************@twister.socal.rr.com>, pillbug
<xx*******@socal.rr.com> wrote:
Hi,
I'm trying to tie a hash that is returned from a DBI
method called fetchrow_hashref. All I want to do is
override the FETCH method to validate my key names.
But fetchrow_hashref returns a reference to a hash, not a hash, and tie
seems to want a hash. Or maybe I want to tie it as a scalar?
How can I do this? I'm sort of new to perl.
Why don't you make a hash copy:
my $hash_ref = fetchrow_hashref(...);
my %hash = %{$hash_ref}
and tie %hash ?
If you are new to perl, why are you trying to tie hash references? I
programmed in Perl for 10 years and have yet to use Tied variables.
FYI: this newsgroup is defunct. Try comp.lang.perl.misc in the future.