Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: One to Many is Too Many?

by roboticus (Chancellor)
on Apr 22, 2008 at 17:37 UTC ( #682287=note: print w/replies, xml ) Need Help??


in reply to One to Many is Too Many?

Jamin:

You might try modifying a standard sort/merge operation. A brief pseudocode description is:

SortByBugID("BugDescriptions","BugDescriptions.s"); SortByBugID("BugComments","BugComments.s"); BD = open "<BugDescriptions.s" COM = open "<BugComments.s" OUT = open ">ResultFile" curBD = <BD> curCOM = <COM> while !BD.eof && !COM.eof { if curBD.BugID < curCOM.BugID { write OUT, curBD curBD = <BD> } elsif curBD.BugID == curCOM.BugID { curBD.Comment .= curCOM.Comment curCOM = <COM> } else { die "Missing bug description?" } }

If you're interested in this method, I have an earlier node with working code for a similar problem.

...roboticus

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2023-12-10 22:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?