我正试图利用这种 has——
#!/usr/bin/perl -w
use strict;
my %hash = ();
sub hash_populate
{
my $name = "PQR,ABD,XYZ";
my @parts = split(/,/,$name);
my $i = $parts[0];
my $a= $parts[1];
my $b = $parts[2];
$hash{$i} = {"A" =>$a,"B" => $b};
my $c = $hash{$i}{"A"};
print $c;
}
我收到表格的错误。
Can t use string ("HASH(0x16c43c)") as a HASH ref while "strict refs" in use
同一代码在<代码>严格使用时不在场。 谁能告诉我为什么?