c:\@Work\Perl\monks>perl -wMstrict -le "use Data::Dumper; ;; my @A1 = qw(a b c d e f g); my $n = 2; my @A2 = splice @A1, -$n; ;; print Dumper [\@A1, \@A2]; " $VAR1 = [ [ 'a', 'b', 'c', 'd', 'e' ], [ 'f', 'g' ] ]; #### c:\@Work\Perl\monks>perl -wMstrict -le "use Data::Dump qw(dd); ;; my @A1 = qw(a b c d e f g); my $n = 14; my @A2 = splice @A1, @A1-$n, $n; ;; dd \@A1, \@A2; " ([], ["a" .. "g"]) c:\@Work\Perl\monks>perl -wMstrict -le "use Data::Dump qw(dd); ;; my @A1 = qw(a b c d e f g); my $n = 15; my @A2 = splice @A1, @A1-$n, $n; ;; dd \@A1, \@A2; " Modification of non-creatable array value attempted, subscript -8 at -e line 1.