Perl运算符eqv无法正常工作

时间:2015-04-27 07:32:36

标签: perl operator-keyword equality perl6

下面的代码不起作用,但我不知道为什么。

my $q = (1, 2) eqv (1, 3);
print "$q \n";

我正在使用Perl v5.14。还有“eqv”和“==”之间的区别是什么?

1 个答案:

答案 0 :(得分:4)

Perl5中没有像Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") parentFolder = fso.GetParentFolderName("your path") 这样的运算符。我认为您正在寻找eqv运营商。

要查看eqeq运算符之间的区别,请参阅:

perl string compare with “eq” vs “==”

eq vs. ==

阅读本文以获取更多信息:

What's the deal with all the different Perl 6 equality operators

Comparison of the Perl equality operators