Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: How do I pick a random line from a file?by vroom (His Eminence) |
on Jan 09, 2000 at 11:00 UTC ( [id://1913]=note: print w/replies, xml ) | Need Help?? |
Another more obvious way, but possibly memory intensive
way would be to read the entire file into an array and
then pick a random element.
In Section
Seekers of Perl Wisdom
|
|