monorels has asked for the wisdom of the Perl Monks concerning the following question:
The subroutine rand_elt chooses and return a random element of the parameter list.
sub rand_elt { $_[rand @_] }my $prefix = rand_elt keys %hash;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How it works?
by toolic (Bishop) on Jan 20, 2016 at 19:15 UTC | |
by kcott (Archbishop) on Jan 21, 2016 at 05:05 UTC | |
by AnomalousMonk (Archbishop) on Jan 21, 2016 at 20:25 UTC | |
by kcott (Archbishop) on Jan 22, 2016 at 06:43 UTC | |
by monorels (Novice) on Jan 20, 2016 at 19:30 UTC | |
by monorels (Novice) on Jan 20, 2016 at 19:30 UTC | |
|
Re: How it works?
by shmem (Chancellor) on Jan 20, 2016 at 22:57 UTC | |
by Your Mother (Archbishop) on Jan 21, 2016 at 00:34 UTC | |
by shmem (Chancellor) on Jan 21, 2016 at 07:11 UTC |