in reply to When function is executed twice I get the results from the first set in the second
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: When function is executed twice I get the results from the first set in the second
by gstoykov (Initiate) on Nov 15, 2009 at 18:47 UTC |