in reply to Re^2: Can someone clarify what's happening here
in thread Can someone clarify what's happening here

Did you forgot to remove the parens? You should have gotten a warning and a strict error, but of which explain the issue.
use strict; use warnings; my @perls = (1, 2, 3, 4); sub foo { my @foo = @{shift}; return join $/, @foo } print foo(\@perls)
Ambiguous use of @{shift} resolved to @shift at a.pl line 7. Global symbol "@shift" requires explicit package name at a.pl line 7. Execution of a.pl aborted due to compilation errors.