in reply to Re: Write to multiple files according to multiple regex
in thread Write to multiple files according to multiple regex
Thanks! Refering explicitly to $line is the key it seems, since within foreach, print refers to the elements of @inputs by default.
I also added $line=~ to make it work. Curly braces (# 6.) where also neccessary.
Now it writes all matches, but it puts all matches into the last filehandler only, throwing
"Use of uninitialized value $_ in pattern match (m//) at parser.pl line 60, <> line 4401."
for every line
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Write to multiple files according to multiple regex
by Monk::Thomas (Friar) on Jul 21, 2015 at 12:53 UTC | |
by Foodeywo (Novice) on Jul 21, 2015 at 13:03 UTC |