in reply to random file selection

this wee hack, weighing in at 5 lines, is very similar in spirit to BrowserUKs, but uses Fisher Yates (apologies to Japhy), allows you to specify a directory and subset magnitude etc.
opendir( DIR, "." ) || die "Can't open DIRHANDLE, stopped"; -f $_ and !/^\./ and push @entry, "$_" while ($_ = readdir(DIR)); closedir( DIR ); @entry[-$i,$j] = @entry[$j,-$i] while $j = rand(@entry - $i), ++$i < @ +entry; map { print $_ . "\n" } @entry[0 .. ( shift || 1 ) - 1];
...wufnik

-- in the world of the mules there are no rules --