Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by LanX (Saint)
on Aug 28, 2020 at 07:25 UTC ( [id://11121140]=note: print w/replies, xml ) Need Help??


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. :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121140]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-20 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found