Humble and grateful, your insightful observation to chomp has revived this perl program to a higher level.
The resultant output remains divided by a dash line; and Data::Dumper and print OUT, these lines are not working as buildAD.ldif only gets ,,bless'' coding structure.
foreach $dn ($dn->entries) { push @attr, $dn->dump; }
#$Data::Dumper::Purity = 1;
#$Data::Dumper::Deepcopy = 1;
my $ev = Data::Dumper->Dump(
$dn,
qw(dn));
print OUT $ev;
}