in reply to shuffle array (in place)

You probably did not really define the function as you posted it, but rather like this:

sub fisher_yates_shuffle () { ... }
...which tells perl (via an empty prototype) that the function should take no arguments. (Prototypes are described in perlsub). Just remove the () after the sub's name and it will work fine.

the lowliest monk