Here's An Algorithm from the Camel Book:
SRAND;
Rand ($.) <1 && ($ line = $ _) while <>;
THIS HAS A Significant Advantage In Space Over Reading The Whole File in