--Bob Niederman, http://bob-n.com# UNTESTED @ar = <FILE>; while ( @ar) { my $ind = int rand scalar @ar; print "$ar[$ind)\n"; splice @ar, $ind, 1; }
In reply to Re: Random lines from a file for a quiz
by bobn
in thread Random lines from a file for a quiz
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |