以下
代码错误:
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的正确语法是什么?
elsif
行上的第一个)
字符导致问题。删除它应该可以消除该语法错误。