Hi,
I make a script to compare some variable in the same file but it not
working could some one help please. This is the script:
my $datainfo = '/gupl/GenerarUser';
$count = 0;
$count1 = 0;
#$countline = 0;
#$linejump = 8;
open (LECTOR, "$datainfo/students_creados") || die "ERROR: NO Encuentro el
archivo 'students_creados'\n";
while (<LECTOR>) { #PRIMER WHILE
chomp;
@linea = split;
$name[$count] = $linea[7];
$count += 1;
}
}#PRIMER WHILE
close LECTOR;
$num = $count;
for ($i = 0; $i <= $num; $i++) {
open (LECTOR1, "$datainfo/students_creados") || die "ERROR: NO Encuentro el archivo
'students_creados'\n";
while (<LECTOR1>) { #PRIMER WHILE
chomp;
@linea = split;
$login = $linea[7];
if ($name[0] =~ /$login/i){
$count1 += 1;
if ($count1 > 1){
open (PRINTER, ">>$datainfo/repeticiones");
print PRINTER "$login $count1 \n";
} }
}#PRIMER WHILE
close LECTOR1;
}
The script is writing al the file again and that not I want, I only want
the file with the repeat variable
Thank for the help
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs