On Apr 28, 2009, at 3:46 AM, Cyril Cheneson wrote:
I have a LDAP structure (ldif format) as perl string.my $ldap_struct =<<"END"; HERE MY LDIF END And I would like to apply the structure to my LDAP server. Net::LDAP::Ldif accepts file name or file handle only. Anyone has an idea how I can apply the LDIF string to LDAP?
You can use IO::Scalar or open(my $fh, "<", \$ldap_struct);I forget which version of perl added the passing of a scalar ref to open.
Graham.