Please explain how and why value of @_ is keeps changing in same subroutine "formatlist" in below code
[root@mail ~]# perl test.pl -w -w out return Command Line in return Command Line: -w [root@mail ~]# cat test.pl sub formatlist { my @list = @_; print @_, ' out return', "\n"; return sub { print @_, ' in return', "\n"; my $title = shift; print "$title: ", join(' ',@list),"\n"; } } $arguments = formatlist(@ARGV); &$arguments('Command Line'); [root@mail ~]#
In reply to @_ & @ARGV by dushyant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |