Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Answer: How do I pick a random line from a file?

by Crulx (Monk)
on Jan 21, 2000 at 05:06 UTC ( #2292=categorized answer: print w/replies, xml ) Need Help??

Q&A > files > How do I pick a random line from a file? - Answer contributed by Crulx

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

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2019-10-23 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?