4 use Test::More tests => 11;
6 our @i4 = (3, 5, 3, 5);
10 is_deeply [ scalar qw(a b c d e f)[3,4] ], [ qw(b) ];
11 is_deeply [ qw(a b c d e f)[3,4,8,9] ], [ qw(a b f), undef ];
12 is_deeply [ scalar qw(a b c d e f)[@i4] ], [ qw(c) ];
13 is_deeply [ qw(a b c d e f)[@i4] ], [ qw(a c a c) ];
15 is_deeply [ qw(a b c d e f)[-1,-2] ], [ qw(f e) ];
16 is_deeply [ qw(a b c d e f)[2,1] ], [ qw(f e) ];
19 is_deeply [qw(a b c d e f)[-3]], ['a'];
23 skip "no lexical \$_", 4 unless eval q{my $_; 1};
26 is_deeply [ scalar qw(a b c d e f)[3,4] ], [ qw(b) ];
27 is_deeply [ qw(a b c d e f)[3,4,8,9] ], [ qw(a b f), undef ];
28 is_deeply [ scalar qw(a b c d e f)[@i4] ], [ qw(c) ];
29 is_deeply [ qw(a b c d e f)[@i4] ], [ qw(a c a c) ];