Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: How do I Extract contents from given input files and merge into one text file based on Unique keys present in input files

by dwm042 (Priest)
on Sep 02, 2009 at 17:18 UTC ( [id://792973]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I Extract contents from given input files and merge into one text file based on Unique keys present in input files
in thread How do I Extract contents from given input files and merge into one text file based on Unique keys present in input files

lnin,

bart above really does have the answer to this question. You can't easily read data and then immediately write data any way you please. To write the data column-wise or anyway-wise, it's best to:

  • read all the data and store it.
  • write the data out in the format you want.
Given that you are wanting to write out the data in terms of iterations and line numbers, the data can be stored in an array (as pairs of numbers, for example). The index to the array can be the number of the iteration.
  • Comment on Re^2: How do I Extract contents from given input files and merge into one text file based on Unique keys present in input files

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found