$ perl -e' use strict; use warnings; use feature qw( say ); my @a = qw( a b c d ); my $r = sub{ \@_ }->(@a); say for @a, @a=(); say "--"; say for @a; ' a b c d --