open( USRS, "users.txt" ) or die "no users.txt: $!"; while () { my ($keystring, $emailstring) = (split /\t/, $_)[0,2]; if ( exists $postiniList{$keystring} ) { my $report = "$keystring exists in ldap\n"; unless ( exists $ldapList{$keystring} ) { $report =~ s/ exists / does not exist /; $report .= "deleteuser $emailstring\n" if ( $emailstring ); } print $report; } } close USRS;