2 ms·
Can you use <=> on arrays in Perl? In ruby that would be [$maj, $min, $rel] <=> [3, 6, 8]
by mcphage 5y ago
Can you use <=> on arrays in Perl? In ruby that would be [$maj, $min, $rel] <=> [3, 6, 8]
- smueller1234 5y agoAt least in Perl 5 (which TFA uses), you can not. Or certainly not expect a useful result. https://perldoc.perl.org/perlop#Relational-Operators https://perldoc.perl.org/perlop#Relational-Operators
- toast0 5y agoIt says a numerical comparison, so it will compare only the length of the arrays.