in reply to How do I pick a random line from a file?
$n = int rand `wc -l $file`; do { $l = $_ if $. == $n } while <>; [download]