Closed Tux closed 9 years ago
$ cat test.pl
#!perl use strict; use warnings; our $VERSION = "0.00"; my @c; my %row = map { $_ => 1 } 0..10; push @c, [ @row{sort { $a <=> $b } keys %row } ];
$ perlcritic -1 test.pl test.pl#10.24: [4 - Freenode::DollarAB] Using $a or $b outside sort() :$a <=> $b test.pl#10.31: [4 - Freenode::DollarAB] Using $a or $b outside sort() :$a <=> $b
Perl::Critic::Utils appears to class "sort" as a hash key in this instance, I'll add a check to allow for that. Thanks!