in reply to Re: Subroutine that modifies actual variable
in thread Subroutine that modifies actual variable

The first answer already showed how to do it without using Perl's (IMHO broken) prototype semantics or with an explicit reference.

That said, I think it is stylistically a bad idea to modify variables passed in by reference without warning in the usage or the name of the function.

  • Comment on Re (tilly) 2: Subroutine that modifies actual variable