On 29/9/06 2:14, Ramma <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Sorry I am new here and my query might sound stupid.
> I am trying to do an LDAP search and dump the results in a file
>
> My Code looks something like this
>
> .
> .
> .
> $fileId = ">./OUTPUT/attrValues.txt";
> open(ATTRVAL, $fileId) or warn $@;
> .
> .
>
> @result = $entry->get_value($cmdAttr);
> $entry->dump(ATTRVAL);
> if($result[0] eq $cmdValue){print ATTRVAL "ID:".$id." >>
> "."Attr:".$cmdAttr."Value:".$cmdValue."\n"};
> .
> .
> .
>
>
> The Command "$entry->dump(ATTRVAL);" dumps the data for me to the file
> attrValue.txt rather it prints it on the screen (Linux) or dont print it at
> all (Solaris).
>
> Can anyone help please.
I'd definitely be tempted to pass the filehandle to dump() as *ATTRVAL. If
you running with 'use strict' the script fails unless you use the '*'.
Cheers,
Chris