Weblog entry #1 for carter
#1
hash as a reference is deprecated
Posted by carter on Wed 10 Jan 2007 at 16:01
I am a beginner at Perl and I am trying to get rid of "Using a hash as a reference is deprecated at" warning from the following code:
sub get_tab_list {
my $ttc = shift;
my $tab_h = ${$_[0]};
my @tab_l;
my ($tab, $tab_ttc);
foreach $tab (keys %{$tab_h}) {
foreach $tab_ttc (@{%{$tab_h}->{$tab}->{TTC}}) { --Warning occus on this line
if ($tab_ttc eq $ttc) {
push( @tab_l, $tab );
last;
}
}
}
return @tab_l;
}
Can anyone help?
sub get_tab_list {
my $ttc = shift;
my $tab_h = ${$_[0]};
my @tab_l;
my ($tab, $tab_ttc);
foreach $tab (keys %{$tab_h}) {
foreach $tab_ttc (@{%{$tab_h}->{$tab}->{TTC}}) { --Warning occus on this line
if ($tab_ttc eq $ttc) {
push( @tab_l, $tab );
last;
}
}
}
return @tab_l;
}
Can anyone help?