in reply to Error while using stirct.

Sometimes Perl's error messages aren't the best. In particular, the fourth error message:

Unmatched right curly bracket at ldap_data.pl line 19, at end of line syntax error at ldap_data.pl line 19, near "}"

is the really interesting one. If you have syntax errors, ignore the erorrs from strict. Fix the syntax error first.

The syntax might also be related to the fact that you close the subroutine before you use $base etc, ie you define these variables inside the subroutine, but try to use them on the outside. That doesn't work.