That's because @newdeck is a global variable, and you don't clear it.
I recommend to use strict; use warnings; and declare my @newdeck inside the shuffle sub.
There's also a shuffle function in the core module List::Util, which is tested and works.
In reply to Re: When function is executed twice I get the results from the first set in the second
by moritz
in thread When function is executed twice I get the results from the first set in the second
by gstoykov
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |