You've already got a good answer explaining what you need to know.
I just wanted to add that for about the last ten years there have been very few occasions when you need to put the '&' on the front of a function call. Unless you know that you need it (and in 99% of cases - including this one - you don't) then you should leave it off.
And if you got that bad habit from a book or an online tutorial then you should view any other information that you got from the same place with deep suspicion.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: How to pass by reference
by davorg
in thread How to pass by reference
by tanyeun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |