Question : Perl error: invalid command name "use"

I am running a perl program on a Solaris 10 UNIX system but when I run it I get this error:
invalid command name "use"
    while executing
"use Mozilla::LDAP::Conn"
    (file "./CoreIDcheckBMS" line 3)

I tested the command:
perl -MMozilla -e 1
and
perl -MLDAP -e 1
and
perl -MConn -e 1

and each time I got error. Does it mean I do not have the modules installed? I do not get error if I run the same code on a different Solaris 8 system. If I need to install those module, where/how do I get those..?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
#! /usr/sfw/bin/tclsh8.3

use Mozilla::LDAP::Conn;

$BASE_DN       = "ou=People, ou=Intranet, dc=Co, dc=com";
$LDAP_PORT     = "389";
$LDAP_SERVER   = "ads.co.com";
my $connection;
$connection = new Mozilla::LDAP::Conn( "$LDAP_SERVER", "LDAP_PORT", "", "" );
die "Couldn't connect to LDAP server $LDAP_SERVER" unless  $connection;

Answer : Perl error: invalid command name "use"

If you want to build PerLDAP, you'll need to follow the specific instructions for PerLDAP :

        http://www.mozilla.org/directory/perldap.html

which links through to :

        http://www.mozilla.org/directory/perlinstall.txt

Take special note of the Solaris remark at the bottom of that page.

Note that the installation instructions require that you have the LDAP client libraries (C SDK) installed (which is what the error from your previous code is about).
Random Solutions  
 
programming4us programming4us