in reply to Can someone clarify what's happening here
Sometimes, the use of B::Deparse is helpful:
> perl -MO=Deparse script_1.pl my(@perls) = (1, 2, 3, 4); sub foo { my(@foo) = @{shift @_;}; return join($/, @foo); } print foo(\@perls); script_1.pl syntax OK > perl -MO=Deparse script_2.pl my(@perls) = (1, 2, 3, 4); sub foo { my(@foo) = @shift; return join($/, @foo); } print foo(\@perls); script_2.pl syntax OK
|
|---|