|Just another Perl shrine|
To infinity and beyond: Embedding loopsby a_mere_kat (Initiate)
|on Jul 16, 2003 at 09:15 UTC||Need Help??|
a_mere_kat has asked for the wisdom of the Perl Monks concerning the following question:
I have a problem with my "fruity loops" they are not so fruity and sadly seem to loop forever.
I am having some problems embedding loops. I get this problem continuously and I don't know why.
Ok here is the problem I need to compare selected fields from two flat files.
I have extracted the one field I want from each line of the two files and placed it into two arrays.
Then using an if statement inside a for loop embedded in another for loop. This set up should compare each element of one array to every element of another array. The results being output to two flat files. respectivly matches and non matches. Instead of producing what I want it to it just goes into an infinite loop. I want to know why this occurs and how I can get over this problem? If anyone sends me a RTFM advisory they can stuff my output in there I/O and die. I am posting this because I would like help not abuse please.
Below is the code I have written to perform the task Feeble as it may be it should do the job. Would someone out there please be kind enough to point out what may be obvious to them but is sadly not obvious to freshmeat like me. Thankyou for your time.
update (broquaint): added <code> tags