The conditional to print looked rather fishy, but I forgot about it. Try:
print {$filehandles[$i]} $line - if (/$regex[$i]/../^END_OF_BLOCK/); + if ($line =~ /$regex[$i]/../^END_OF_BLOCK/);
or did you already do exactly that? Please show your updated code.
In reply to Re^3: Write to multiple files according to multiple regex
by Monk::Thomas
in thread Write to multiple files according to multiple regex
by Foodeywo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |