下面的代码不起作用,但我不知道为什么。
my $q = (1, 2) eqv (1, 3);
print "$q \n";
我正在使用Perl v5.14。而且“ eqv”和“ ==”之间有什么区别?
[Perl5中没有像eqv
这样的运算符。我认为您正在寻找eq
运算符。
要查看eq
和==
运算符之间的区别,请参见:
perl string compare with “eq” vs “==”
阅读此以获得更多信息:
What's the deal with all the different Perl 6 equality operators