in reply to Re: A Romp Around addn
in thread A Romp Around addn

Thank you for finding that. $n is a read-only alias to the caller's value. I see your point: the original value might change, and that would affect the closure.

However, you don't have to make a copy the way you show. Just change the parameter to pass-by-copy. I'll update the article.

—John