From: <ma...@mj...> - 2001-02-06 23:19:08
|
The write method takes an array reference. So either pass it $ldif->write($msg->entries) or $ldif- >write(@{$entry}); mark On 6 Feb 01, at 9:44, Jeremy Fassler wrote: > Basically what I'm trying to do is pull information out of an LDIF > file, and put it into an array or hash, so I can display it to the > user and export it into a database. The commented line #print > "$entry\n"; was taken out becuase it just prints the hash reference, > and not the data itself, so I was told to use $ldif->write($entry); > instead. However, when I do this, it outputs no data. My test ldif > file has 3 entries, and if I uncomment that line, it does print 3 hash > references. So I know it is reading the file, but I cant get any info > out of it! > > Thanks in advance! Here is my code. (win32 platform) > > > #!d:/perl/bin/perl.exe > > use Net::LDAP::LDIF; > > $ldif = Net::LDAP::LDIF->new( "D:/test.ldif", "r" ); > > while( $entry = $ldif->read() ) > > { > > #print "$entry\n"; > > $ldif->write($entry); > > } > > $ldif->done(); > > Mark Wilcox ma...@mj... Got LDAP? |