下面的代码不起作用,但我不知道为什么。
my $q = (1, 2) eqv (1, 3);
print "$q \n";
我正在使用Perl v5.14。还有“eqv”和“==”之间的区别是什么?
答案 0 :(得分:4)
Perl5中没有像Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
parentFolder = fso.GetParentFolderName("your path")
这样的运算符。我认为您正在寻找eqv
运营商。
要查看eq
和eq
运算符之间的区别,请参阅:
perl string compare with “eq” vs “==”
阅读本文以获取更多信息:
What's the deal with all the different Perl 6 equality operators