[kincsem.btf.hu...]
---------------------
A CGI random quiz generator. Teacher/admin may add to a pool of questions and multiple-choice/true-false answers with the admin interface. Through the use of cookies, students are randomly given a predetermined number of questions. Students won't get the same question more than once, and each student will see the questions in a different order.[linguistic-funland.com...]
#!/usr/bin/perl -w
use strict;
my $textfile = "/home/me/myfile.txt"; # file with words/sentences, one per line
my $howmany = 20; # how many random picks to display
open (FILE,$textfile) ¦¦ die $!;
my(@lines)=<FILE>;
close FILE;
for (1..$howmany) { print $lines[int(rand()*scalar(@lines))] }