There's more than one way to do things | |
PerlMonks |
Re: Executing a "/foo/flags" regex from a stringby Rhandom (Curate) |
on Dec 30, 2015 at 01:59 UTC ( [id://1151417]=note: print w/replies, xml ) | Need Help?? |
Here is a small snippet that should do what you were asking for (more or less):
my @a=qw(random brilliant braindead); print $a[rand(@a)];
In Section
Seekers of Perl Wisdom
|
|