in reply to Re^3: Split tab-separated file into separate files, based on column name (updated)
in thread Split tab-separated file into separate files, based on column name

Hi

The strange thing is that the "reopened" files are created but all output still goes to the first one.

Probably a Windows issue...

Ok got it. I'm pushing new file handles onto the @FH array, but only the first 3 ones are written!

The trouble with overly clever one liners... 🤦🏻‍♂️

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

  • Comment on Re^4: Split tab-separated file into separate files, based on column name (solved)

Replies are listed 'Best First'.
Re^5: Split tab-separated file into separate files, based on column name (solved)
by jcb (Parson) on Aug 28, 2020 at 23:26 UTC

    Try putting open ..., '>', $_ for split scalar <> or similar in a BEGIN block, instead of running it on each loop iteration. :-)