Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
That randomizes the array perfecty but how do I make it so I can display the first character it finds and remove it so it won't find it next time it's randomized?use warnings; use strict; use Algorithm::Numerical::Shuffle qw /shuffle/; my @shuffled = shuffle (1, 2, 3, 4, 5, 6, 7); #my $in_situ = [qw /one two three four five six/]; #shuffle $in_situ; print @shuffled;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: removing element from an array
by jeffa (Bishop) on Jun 07, 2003 at 00:57 UTC | |
by waswas-fng (Curate) on Jun 07, 2003 at 01:45 UTC | |
|
Re: removing element from an array
by mirod (Canon) on Jun 06, 2003 at 22:13 UTC | |
|
Re: removing element from an array
by chanio (Priest) on Jun 07, 2003 at 22:56 UTC |