以下代码错误:
if (! defined $dchash{$location}) {
die "Unrecognized realm: $location";
}
elsif ($dchash{$location}) ne $realm) {
die "Incorrect realm for host in $location, expected $dchash{$location} got $realm";
}
syntax error at ./test.pl line 73, near ") ne"
Execution of ./test.pl aborted due to compilation errors.
验证 $realm 是否在哈希中的正确语法是什么?