Alden Meneses wrote: > so i have a text file that looks like this > > 10/04/2004 UPL TZOO CME CRDN WIBC PETD SMF > 10/11/2004 UPL TZOO CME WIBC PETD VNBC AMED > > anyway each line has 1 date field and 100 stock symbols and they are > in order. I am trying to compare the different lines to see what has > changed. > From what you have provided, I a assuming the data comes in two line sets and you want to compare these two line sets and see what has been added and/or deleted from one run to the next.
I would probably use a hash and add 1 to each element in line 1 or odds and add 2 for line 2 or evens. Then a quick check using: 1: Deleted from prior run 2: Added since last run 3: same as last run. Rebuild for set or if you honly have one, then a moot quiestion. Wags ;) > so I open the file and put the <FH> into an array > @array=<FH>; > > but $array[0]; = line 1 and $array[1]; = line 2. > > i keep thinking that i need to break down the array into each line and > match a symbol to an array so that $array[0] = 10/04/2004 and > $array[1] = UPL then compare it to the 2nd line somehow but don't > think I am thinking this problem out correctly. > > can someone help with my logic? > > tnx in advance, > alden ******************************************************* This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. ******************************************************* -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>