|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re^3: my $x or my ($x)by Rhandom (Curate) |
| on Apr 05, 2006 at 15:06 UTC ( #541408=note: print w/ replies, xml ) | Need Help?? |
|
The only warning I can give is that using an undef in the list will throw warnings (errors?) in older versions of perl:
This is particularly more useful in cases where you already have a declared variable.
my @a=qw(random brilliant braindead); print $a[rand(@a)];
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||