No, @_ is an alias to the sub's arguments. That's how things like chomp work:
sub my_chomp { $_[0] =~ s/\r?\n\z//sm; } my $var = "foo\n"; my_chomp $var; print "[[$foo]]\n";
perlsub says:
The array @_ is a local array, but its elements are aliases for the actual scalar parameters.
In reply to Re: How come @_ gets changed here?
by tobyink
in thread How come @_ gets changed here?
by pritesh_ugrankar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |