in reply to Populating the array, what am I doing wrong.

Use strict and warnings. Always.

Your problem is most likely related to these lines:

$ cat 682776.pl use strict; use warnings; my @fields=~'/opt/apache/1.3.27/cgi-bin/cspireutils/ldapsearch -h 172. +30.58.243 -p 389 .. __END__
What exactly is it you want @fields to contain? Hints:
--
No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]

Replies are listed 'Best First'.
Re^2: Populating the array, what am I doing wrong.
by trelane (Initiate) on Apr 25, 2008 at 12:37 UTC
    Hi,
    I want the fields to hold the results of the ldapsearch for example :
    field dn cn=t43311 field jrMailboxId poohbear@woods.com field jrMailboxAliasStore 452125643 field jrPWPUID poohbear field jrPWPUserPrefs poohbear field jrUserFriendlyID poohbear

    As this information is used later in the script, the script is supposed to take the input from the cgi, which is the SID, the existing mail address and proftp information, the ldapsearch searches for the SID and is supposed to populate the array with the requested fields.

    If the jrFriendlyID is unique, it modifies the user object to have the input from the cgi for mail address and proftp.