Home > Archive > LDAP > October 2006 > Query about $entry->dump(FILEHNDL)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Query about $entry->dump(FILEHNDL)
|
|
|
| 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.
Many Thanks
Ramma
--
Make God Laugh, Tell Him Your Future Plans
| |
| Chris Ridd 2006-09-30, 4:06 am |
| On 29/9/06 2:14, Ramma <rock.ramma@gmail.com> 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
| |
|
| Hi Chris,
Thanks for your input. It really works.
Cheers
Ramma
On 9/30/06, Chris Ridd <chrisridd@mac.com> wrote:
>
> On 29/9/06 2:14, Ramma <rock.ramma@gmail.com> wrote:
>
> at
>
> 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
>
>
>
--
Make God Laugh, Tell Him Your Future Plans
|
|
|
|
|