use List::Util qw(shuffle); my @arr = ('A'..'Z'); my $combo = join '', (shuffle(@arr))[0..1]; print "$combo\n";
In reply to Re^2: oneliner for selecting multiple values from array (shuffle)
by toolic
in thread oneliner for selecting multiple values from array
by ev00rg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |