in reply to Undefined subroutine

AgentM is correct. You are calling Net::LDAP, which is a subroutine named LDAP in the Net module.

You want the following:
my $ldap = new Net::LDAP();


BlueLines

Disclaimer: This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.

Replies are listed 'Best First'.
Re: Re: Undefined subroutine
by hhh (Initiate) on Mar 13, 2001 at 01:03 UTC

    when I added new at line 5, another error message pop up (see below). Do you have similar examples? Thanks.

    Undefined subroutine &main:: called at ./ldap.pl line 5