0
私はPerlでハッシュを扱おうとしています。私は、次の例ているハッシュからアイテムを取得できませんgetグローバルシンボルに明示的なパッケージ名が必要です
:
my %ERROR_CODE_101 = ("id" => 101,"desc" => "blablabla");
sub checkError
{
# some switch-case
#....
return %ERROR_CODE_101;
}
sub runCommand
{
my $code = checkError();
if($code{id} > 0) # error happens here line 216
{
#...
}
}
エラー:
Global symbol "%code" requires explicit package name at build_ios.pl line 216.