Comparing multiple numerical values in Perl -


say have few variables, $x, $y, $z, $a, $b, $c, , want make sure have same value.

can test if ($x == $y == $z == $a == $b == $c) avoid multiple binary comparisons, i.e. (if $x == $y , $x == $z , $y == $z ...)?

is there way can comparing 1 short , simple test?

if ( grep $x != $_, $y, $z, $a, $b, $c ) {     print "not same\n"; } 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -