我想编写一个脚本来检查3个变量(A,B,C)是否都是唯一的并且彼此不相等.我想过做一个很大的if语句,如:
if (A != B) && (A != C) && (B != C){
// do function }
Run Code Online (Sandbox Code Playgroud)
我只是想知道是否有另一种方式?因为代码看起来很笨重.这是Perl.
我正在尝试将我的Perl版本从5.14升级到5.20.
当我运行perl 5.20升级sudo pkg更新时出现system/runtime/perl@5.20此错误:
pkg update: No matching version of system/runtime/perl can be installed:
Reject: pkg://ms.system.com/system/runtime/perl@5.20.0,5.11-0.151006:20140604T182727Z
Reason: This version is excluded by installed incorporation pkg://perl.system.com/omniti/incorporation/perl-514-incorporation@5.14,5.11-0.151002:20120725T211507Z
Run Code Online (Sandbox Code Playgroud)
因此我首先尝试卸载当前的5.14版本sudo pkg uninstall system/incorporation/perl-514-incorporation并获得:
Creating Planpkg uninstall: Cannot remove 'pkg://perl.omniti.com/omniti/incorporation/perl-514-incorporation@5.14,5.11-0.151002:20120725T211507Z' due to the following packages that depend on it:
// A list of dependent packages
Run Code Online (Sandbox Code Playgroud)
关于如何通过这个问题的任何问题?