for my $i (0 .. $#cg) { my $g = $cg[$i]; if ($g eq $gl[$i]) { push @ind, $g; print N "$g\n"; print S "$csta[$i]\n"; } }