Hello, I just glanced over your code and it looks like you are trying to run nested while loops on two open files. If this is so then you need to give the inner loop file handle and outer loop file handle different names. You have named them both LECTOR. You handled this problem with your variables in the two loops so just name the inner file handle LECTOR1 and that should fix it.
Matt Schneider Programmer/System Administrator SKLD Information Services, LLC -----Original Message----- From: Ing. Ricardo Cumberbatch L. (PANNet - URC) [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 3:05 PM To: [EMAIL PROTECTED] Subject: [Perl-unix-users] want to compare character in two files Hi everybody, I do a script to that pick some character from file A and the open and read file B and search is equal or not. This is the example: my $datainfo = '/gupl/GenerarUser'; $count = 1; open (LECTOR, "$datainfo/students_creados") || die "ERROR: NO Encuentro el archivo 'students_creados'\n"; while (<LECTOR>) { #PRIMER WHILE chomp; @linea = split; $name =$linea[0]; open (LECTOR, "$datainfo/passwd5") || die "ERROR: NO Encuentro el archivo 'students_creados1'\n"; while (<LECTOR>) { #SECOND WHILE chomp; @linea1 = split; $name1 = $linea1[0]; if ($name1 =~ /$name/i){ open (PRINTER, ">>$datainfo/repeticiones"); print PRINTER "$linea1[0] $count \n"; $count+= 1; close (PRINTER); } And it not workin could some one tellme what I do wrong Thanks for any help _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs