Re: help on comparing lines in a text file

2004-10-18 Thread Gunnar Hjalmarsson
Alden Meneses wrote: sorry about the confusion. i should have said the file had multiple lines besides the two listed. i update the file once a week. it is a file with the top 100 stocks this newspaper puts out. so the file will have multiple lines and I guess I am really concerned about the last t

Re: help on comparing lines in a text file

2004-10-18 Thread Alden Meneses
sorry about the confusion. i should have said the file had multiple lines besides the two listed. i update the file once a week. it is a file with the top 100 stocks this newspaper puts out. so the file will have multiple lines and I guess I am really concerned about the last two lines as that wo

Re: help on comparing lines in a text file

2004-10-18 Thread Gunnar Hjalmarsson
Alden Meneses wrote: if I don't use a loop it seems that it only processes 1st two lines. is there another way I can process the file without a loop? In your initial post you said: "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 PE

Re: help on comparing lines in a text file

2004-10-18 Thread Alden Meneses
thanks again - GH if I don't use a loop it seems that it only processes 1st two lines. is there another way I can process the file without a loop? On Mon, 18 Oct 2004 19:02:04 +0200, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: > Alden Meneses wrote: > > here is my updated code > > > > use str

Re: help on comparing lines in a text file

2004-10-18 Thread Gunnar Hjalmarsson
Alden Meneses wrote: here is my updated code use strict; use warnings; Yeah!! :) while(){ my @array_a = split ' ', ; my @array_b = split ' ', ; compare_array(); } By declaring the arrays within a while loop, they are not accessible outside the loop. That's why Perl complains. (Suggeste

Re: help on comparing lines in a text file

2004-10-18 Thread Alden Meneses
thanks GH here is my updated code use strict; use warnings; my $file = 'C:\Documents and Settings\menesea\My Documents\alden712\ibd100\ibd100.txt'; open(IBDIN, "<$file") || die "cannot open $file $!"; while(){ my @array_a = split ' ', ; my @array_b = split ' ', ; compare_array(); } c

Re: help on comparing lines in a text file

2004-10-16 Thread Gunnar Hjalmarsson
Alden Meneses wrote: 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=); chomp(@list_b=); for ($a = 0; $a < @lis

Re: help on comparing lines in a text file

2004-10-16 Thread Alden Meneses
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=); chomp(@list_b=); for ($a = 0; $a < @list_a; $a+=2){ @ar

Re: help on comparing lines in a text file

2004-10-12 Thread Rafael Morales
ards - Original Message - From: Alden Meneses <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: help on comparing lines in a text file Date: Mon, 11 Oct 2004 22:57:51 -0700 > > so i have a text file that looks like this > > 10/04/2004 UPL TZOO CME CRDN WIBC PE

RE: help on comparing lines in a text file

2004-10-12 Thread Wagner, David --- Senior Programmer Analyst --- WGO
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 wha

Re: help on comparing lines in a text file

2004-10-12 Thread Gunnar Hjalmarsson
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. U

help on comparing lines in a text file

2004-10-11 Thread Alden Meneses
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