in reply to Re: Why use references?
in thread Why use references?
which shows that args are passed "by reference" by default. Of course, it may not be good style to alter @_ in this way, but the point is that you don't need to pass a reference to alter the argument inside the sub.sub increment { ++$_[0]; } $num=0; increment($num); print $num,"\n";
|
|---|