there is no need to know the number of the lines in the file.rand($.) < 1 && ($line = $_) while <>
In reply to Re^2: Opening random files then reading random lines from file.
by choroba
in thread Opening random files then reading random lines from file.
by fame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |