We help IT Professionals succeed at work.

Activeperl quits after command

mechanicus01 asked
Last Modified: 2012-05-08
I've installed avtiveperl along with some modules. There is an LDAP server that i need to connect to, but when i try this in cmd prompt, it shuts down:
I open run>perl, then perl.exe cmd prompt opens. I type in the following:

use Net::LDAP;

and it quits, exits on me.
What i am trying to do i connect to a LDAP mail server and load in users. I am running ActivePerl5.10 on XP , any ideas?
Thank you
Watch Question

Top Expert 2007
This one is on us!
(Get your first solution completely free - no credit card required)


So, what i have to do is write the code onto notepad and save it with an extension of .pl?
I see , thank you...

How do i populate the LDAP server or remove entries from it? How can i see that i am inside the LDAP server and that i am connected to it?

Top Expert 2007

You can use whatever editor you like.  Notepad is OK, but you would be better off with gvim or ultraedit which are much better if you are doing coding.

As for using Net::LDAP, I'd suggest reading the FAQ



ok, i decided to go with UltraEdit, which is great by the way :)
we managed to monve forward and thank you.
I created the script and ran it in CMD prompt making sure i was in the same directory.
thisis the script: MP.pl
$mp = Net::MirapointAdmin->new( host=>, port=>10143,
exception=>code_ref, debugfunc=>code_ref, debug=>[0], ssl=>[0] );

I get the this error:
Can't locate object method "new" via package "Net::MirapointAdmin" (perhaps you
forgot to load "Net::MirapointAdmin"?) at C:\Users\Felipe Cardenas\Desktop\MP.pl
 line 1.
 The LDAP server is in host
Top Expert 2007

What is your complete code?

I assume you do have a

use Net::MirapointAdmin;

in your script?

Have you installed the module via ppm?


Yes, the module is installed via ppm
cmd>ppm install Net-MiapointAdmin (it went thru installation process, restarted ppm and its in there)
I double checked under installed modules and i confirm its installed
This is the code:
use Net::MirapointAdmin;

$mp = Net::MirapointAdmin->new(host => $,
                                   ssl => $ssl,
                                   debug => $debug);
        $mp->login($administrator, $password)
i get this error:

"use" not allowed in expression at C:\Users\Mechanicus01\MP.pl line 2, at end of line
syntax error at C:\Users\Mechanicus01\MP.pl line 2, near
"use Net::MirapointAdmin"
Execution of C:\Users\Mechanicus01\MP.pl aborted due to compilation errors.

Top Expert 2007
This one is on us!
(Get your first solution completely free - no credit card required)


Ok. that worked , but now i get another error.
According to the Net::MirapointAdmin in CPAN, the following code is correct:
use Net::MirapointAdmin;
$mp = Net::MirapointAdmin->new(host => $,
                                   ssl => $ssl,
                                   debug => $debug);
      $mp-> login($administrator, $virmar);
But i get this error:
Can't call method "login" on an undefined value at C:\Users\Mechanicus01\UltraEdit\MP.pl line 6.


his was a multilevel question and answer. We got far along in the process but there is still more to go. I ddint know when to award the points because it was a series of trail and errors by my part. Big ups to Tintin for guiding me thru this. thanks

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.