in reply to Populating the array, what am I doing wrong.
Your code has lots of problems. For starters, the line
is completely bogus Perl. What in the world did you mean to be doing there?@fields=~'/opt/apache/1.3.27/cgi-bin/cspireutils/ldapsearch -h 172.30 +.58.243 -p 389 -D $dirsrv -w 'passwd' -b ou=subscribers,ou=users,ou=p +rague,ou=domains,ou=cz,ou=domains,o=chello cn=$sid dn jrMailBoxId jrM +ailboxAliasStore jrPWPUID jrPWPUserPrefs jrUserFriendlyID';
A few lines further down, it looks like you're reading from stdin with
What data are you expecting to read from stdin? I.e. are you expecting to pipe the input from another program's output?while (<>) {
This kind of touches on another bug, which is that you have declared %thisrecord inside that while loop, but you try to use it later in the program. This doesn't make sense, and merely moving the %thisrecord declaration outside the loop probably won't result in a correct program.
And that relates to another bug: You try to use a field from the hash in a string, as "%thisrecord{'jrPWPUID'}... but that is incorrect; it should be "$thisrecord{'jrPWPUID'}... (Note the $, vice %.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Populating the array, what am I doing wrong.
by trelane (Initiate) on Apr 25, 2008 at 14:30 UTC | |
by jdporter (Paladin) on Apr 25, 2008 at 14:57 UTC |