In the immortal words of [EMAIL PROTECTED]:

> I had a look at the Net::LDAP:LDIF module. As I understand I can read LDIF 
> from a file.
> I have however LDIF in a perl variable. Is there a easy way to use the 
> variable instead of a file ? What I want to avoid is to use the IO System 
> if not necessary.

If you have perl >= 5.8.0 and built with PerlIO, you can "open" a
scalar to get a filehandle using the three-arg format of open with a
reference:

  open(FH, '<', \$ldif_data);

Then just pass FH to your Net::LDAP::LDIF::new call.

%%  Christopher A. Bongaarts  %%  [EMAIL PROTECTED]       %%
%%  Internet Services         %%  http://umn.edu/~cab  %%
%%  University of Minnesota   %%  +1 (612) 625-1809    %%

Reply via email to