You can use arrays as filehandles, so any number of files can simply be handled in a loop. The only thing to observe is how to use the filehandles with print:
open ($f[$x],'>','test$x.txt') or die ... ... print { $f[$y] } "whataniceview\n";
You can read about it with 'perldoc -f print' and 'perldoc -f open'
In reply to Re: to divide/split a file to small files.
by jethro
in thread to divide/split a file to small files.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |