in reply to How do I pick a random line from a file?

More cryptically
srand; rand($.) < 1 && ($it = $_) while <>;