http://www.perlmonks.org?node_id=454068


in reply to a HASH ref while "strict refs" ERROR

Another way to fix the problem if you do really want to use prototypes is to declare them before you use them (although I do agree with ikegami that it is probably better not to use them in the first place):

use strict; sub higherLevel(\@); sub showArray(\@); sub higherLevel(\@) { my(@arr) = @{(shift)}; showArray(@arr); } sub showArray(\@) { my(@arr) = @{(shift)}; my($temp); foreach $temp (@arr) { print "$temp\n"; } } my(@arr) = ("one","two","three"); higherLevel(@arr);