good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: How come @_ gets changed here?by pritesh_ugrankar (Monk) |
on Jun 10, 2017 at 22:35 UTC ( [id://1192494]=note: print w/replies, xml ) | Need Help?? |
Respected Monks, Thank you for taking time to reply. I used & at the beginning of a function because, as per Learning Perl book, I am to use an & before calling the function, else, I might accidentally end up calling a perl built-in. In fact there is a link given in the book https://www.learning-perl.com/2013/05/why-we-teach-the-subroutine-ampersand/ which if I understood right, is stating it's better to use & when one is not sure. But from the posts here, I reckon it's not encouraged. So I'm not sure if I should or shouldn't use the &. I will later try to test on other version(s) of Perl and see how it goes.
In Section
Seekers of Perl Wisdom
|
|