Last problem remaining is that everything is written to the last filehandler. I cant see why that is the case.
It looks to me like you are overwriting $ofh on each iteration of the first loop where you set up the array of handles. This would mean that every entry in your array points to the same file (the last file, of course). If you use a local variable inside that loop you may solve the problem. HTH.
In reply to Re^3: Write to multiple files according to multiple regex
by hippo
in thread Write to multiple files according to multiple regex
by Foodeywo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |