>I'm trying to create a function that can determine whether two text files 
>contain the same info. I don't care about what info might be different, 
>just if the two text files are different.

 >The problem is with the following line:

 >while ( (my $line_base = <CRCBASE>) || (my $line_new = <CRCNEW>) ) {

 >Because when you have
 >condition_A || condition_B

 >If condition_A is true, it would skip condition_B and go to next line
 >Therefore, because (my $line_base=<CRCBASE>) successfully read a line 
from file CRCBASE,  the second condition (my >$line_new=<CRCNEW>) is 
skipped thus remain undef

 >You should change || to &&.


Sorry, && would not get what you want to do.  You need to add more codes 
for comparing lines from each file.

Regards
Jing Wee

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to