I have a perl script I'm writing to execute a system script that querys a LDAP server. I make a system call to the script ldapsearch and pass the password to it and then open a text file as an array that contains a list of account names to be queried.
When I run the script it comes back with:
"Can't exec "ldapscript": Argument list too long at ./script line 7.
Here's my script:
********************
#!/usr/bin/perl5.8.0 -w
open(IPF,"<home1"
or die "Failed to open, $!";
@id=<IPF>;
$pass='password';
close(IPF);
system ("ldapscript",$pass,@id);
**********************
Earlier I actuall had the "close(IPF);" line at the bottom of the script and would specify that it bombed somewhere around line 40,000. What do I need to do to make perl wait for a response on the query before continuing on?
Ultimately, I'm trying to grep for a particular response and then log those lines that match the pattern.
Thx!
When I run the script it comes back with:
"Can't exec "ldapscript": Argument list too long at ./script line 7.
Here's my script:
********************
#!/usr/bin/perl5.8.0 -w
open(IPF,"<home1"
@id=<IPF>;
$pass='password';
close(IPF);
system ("ldapscript",$pass,@id);
**********************
Earlier I actuall had the "close(IPF);" line at the bottom of the script and would specify that it bombed somewhere around line 40,000. What do I need to do to make perl wait for a response on the query before continuing on?
Ultimately, I'm trying to grep for a particular response and then log those lines that match the pattern.
Thx!