Help for this page
rand($.) < 1 && ($line = $_) while <FILE>;
while (<FILE>) { my $line = $_; chomp($line); # note, 'chomp' is a safer version of 'chop': see +perldoc -f chomp; # do something with $line... }