Don't ask to ask, just ask | |
PerlMonks |
Loop through two files in comparisonby inperlquest (Initiate) |
on Aug 13, 2012 at 01:58 UTC ( [id://987015]=perlquestion: print w/replies, xml ) | Need Help?? |
inperlquest has asked for the wisdom of the Perl Monks concerning the following question:
Monks, I'm struggling to find a solution to this seemingly simple problem. Please guide me towards salvation.
There are two csv files of which I'm to convert File2 into nested XML. Handcoding the logic, as the library doesn't have the required modules.
File 1 ------- 1,1234 3,2345 File 2 --------- 1234,ABC,10 2345,PQR,34 2345,XYZ,37 2345,LMN,14 I am to process File2 using File1 in iterative comparison, but I get the second line from File2 repeated 3 times in the XML result, unlike what I expect Output as I want it: I see only the line with PQR from File2 repeating all 3 times in the output now This is my code:
What am I doing wrong?
Back to
Seekers of Perl Wisdom
|
|