in reply to Re^2: Write to multiple files according to multiple regex
in thread Write to multiple files according to multiple regex
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Write to multiple files according to multiple regex
by Foodeywo (Novice) on Jul 21, 2015 at 13:33 UTC | |
|
Re^4: Write to multiple files according to multiple regex
by Foodeywo (Novice) on Jul 21, 2015 at 13:44 UTC |