You probably did not really define the function as you posted it, but rather like this:
...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.sub fisher_yates_shuffle () { ... }
the lowliest monk
In reply to Re: shuffle array (in place)
by tlm
in thread shuffle array (in place)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |