here is my updated code but it is not my loops are not set correctly
as I get nothing when i print to screen.....
open(IBDINA, "<$file") || die "cannot open $file $!";
open(IBDINB, "<$file") || die "cannot open $file $!";
chomp(@list_a=<IBDINA>);
chomp(@list_b=<IBDINB>);
for ($a = 0; $a < @list_a; $a+=2){
@array_a=(split(/ /,$list_a[$a]));
for ($b =1; $b < @list_b; $b+=2){
@array_b=(split(/ /,$list_b[$b]));
@[EMAIL PROTECTED] = (); # build lookup table
foreach $item ($array_b){
push(@bonly, $item) unless exists $seen{$item};
print @bonly;
}
}
}
close(IBDINA);
close(IBDINB);
also i haven't thought about end of file as you can see in the loops i
process line 0 and line 1 but didnt think about if the EOF is not an
even count.
On Mon, 11 Oct 2004 22:57:51 -0700, Alden Meneses <[EMAIL PROTECTED]> 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.
>
> 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
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>