my $big_line = "" # Set the newline character to '>' $/ = '>'; open fh, $filename; for (my $i = 0; i < 10000; i++) { $big_line .= ; } $/ = "\n"; close fh;