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);
In reply to Re: a HASH ref while "strict refs" ERROR
by Paladin
in thread a HASH ref while "strict refs" ERROR
by mosh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |