$ perl -Mstrict -Mwarnings -le 'my (@x, @y); @x = ( "A", "B", "C" ); @y = ( "C", "D", "F" ); &test( @x, @y, ); sub test { @test = @_[0]; print "@test\n"; }' Variable "@test" is not imported at -e line 1. Possible unintended interpolation of @test in string at -e line 1. Variable "@test" is not imported at -e line 1. Global symbol "@test" requires explicit package name (did you forget to declare "my @test"?) at -e line 1. Global symbol "@test" requires explicit package name (did you forget to declare "my @test"?) at -e line 1. Execution of -e aborted due to compilation errors.