in reply to Re: Global vars?
in thread Global vars?

Given the existence of virtually any alternative, I would recommend against prototypes.

What if the person uses & in the function call? What if the person you are giving advice to uses it everywhere and then tries to learn how OO works? What if the person tries to put the variables into an array and then calls your function?

Prototypes add a lot of gotchas and not a lot of benefits. Therefore I avoid recommending them even when they look like they might make sense. For instance the following is no more obscure, and has fewer potential issues:

sub mogrify { my ($xref, $yref, $zref) = \@_[0..2]; # do stuff to $$xref and friends 1; }