perl编译错误

时间:2012-12-07 00:14:19

标签: perl

以下代码出错:

 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的正确语法是什么??

1 个答案:

答案 0 :(得分:6)

)行上的第一个elsif字符导致问题。删除它应该消除语法错误。