my @lines = ; for my $c (1 .. 300) { print OUT $lines[int rand @lines]; }