in reply to to divide/split a file to small files.
while (<infile>) { my @line = split /,/, $_; [case code here for determining what data you need] open(FH,">$_[1].txt"); print FH [data you need in said file] }
If your file names are predetermined by some other method, set up a hash with 1-24 as your keys, and use them in the open statement.
|
|---|