in reply to Modifying passed-in variables

It's   $_[0]++; that's called an "alias" and realizes what's named "call by reference" in computer science.

(The array @_ is magic and you need indices to access these aliases. A simple assignment will only copy values)

If you want to address the alias by name you need an indirect perl reference, like

$data = \$_[0]; $$data ++;

Be careful to not confuse perl references and perl aliases.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

updates

Heavily expanded