in reply to How to capture error messages...

Here you can find a pure Perl clone of the ldapmodify command:

ldapmodify.pl

HTH,

PooLpi