my $max_lines = 800; if (($. - 1) % $max_lines == 0) { my $file_num = int(($. - 1) / $max_lines) + 1; my $file_name = "file${file_num}.txt"; open($fh_out, '>', $file_name) or die("Unable to create file \"$file_name\": $!\n"); }
In reply to Re^3: IO::File Question
by ikegami
in thread IO::File Question
by chinamox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |