in reply to Re: Write to multiple files according to multiple regex
in thread Write to multiple files according to multiple regex
nice hint thanks, I didn't know that thing.
I did this:
$/ = '^END';
and within the while
print {$filehandles[$i]} $line if $line=~/$regex[$i]/;
this seems to be much faster (i guess this is all it is about, right?
Last problem remaining is that everything is written to the last filehandler. I cant see why that is the case.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Write to multiple files according to multiple regex
by hippo (Archbishop) on Jul 21, 2015 at 12:55 UTC | |
by Foodeywo (Novice) on Jul 21, 2015 at 13:33 UTC | |
by Foodeywo (Novice) on Jul 21, 2015 at 13:44 UTC | |
|
Re^3: Write to multiple files according to multiple regex
by Foodeywo (Novice) on Jul 21, 2015 at 12:59 UTC |