perl编译错误

Cma*_*mag -2 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.
Run Code Online (Sandbox Code Playgroud)

验证$ realm的正确语法是什么?

qqx*_*qqx 6

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