我认为这个 Perl 应该产生 ['c', undef] 但在 Windows 7、ActiveState 5.16 上它会产生:[]。
#-----------------------------------------------------------------------
# Test List::Pairwise
#-----------------------------------------------------------------------
use v5.16;
use Data::Dump qw(dump);
use List::Pairwise qw(grepp mapp);
use Win32;
my $a = qr(\d+)x;
my $b = qr($a \. $a)x;
my %k = (a=>1, b=>2, c=>undef);
say dump([grepp {!$b} %k]);
say Win32::GetOSName();
say qx(perl -v);
产生:
[]
Win7Home Premium (64-bit)
This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread
(with 1 registered patch, see perl -V for more detail)