my ($first, $second) = @_; return 0 if @$first != @$second; my $i = 0; $second->[$i++] ne $_ && return 0 for @$first; return 1;