From: Jeremy F. <jer...@or...> - 2001-02-06 17:44:56
|
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(); |