in reply to Re^3: Perl cheat sheet
in thread Perl cheat sheet
That's something most people will never need to know.
The problem is that new programmers love to put *everything* in quotes. While it's a bad idea to pass global (lexical and package) variables as arguments, that is probably not a problem you'll ever run into. Just about every sub already creates a copy of the value before it can change.
sub logger { my ($arg) = @_; # The copying happens here, so ... # no need to do it in the caller. }
One could even argue it's the sub's responsibility to protect global variables it changes if it uses @_ at any other point.
In Section
Craft