What about shuffling the array using one of the
shuffle functions in either
List::Util or
Algorithm::Numerical::Shuffle and then
shifting off the desired number (or a random number) of elements?
--
#!/usr/bin/perl
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}