my @file = <>; print splice @file, rand @file, 1 while @file;