3dbc has asked for the wisdom of the Perl Monks concerning the following question:
Original post:
Hi Perl Monks,Do I have to parse these out of the ldif before reading it in with net ldap ldif?# userid2, help, perl.monks dn: uid=userid2,ou=help,dc=perl,dc=monks FriendlyId: crazyID2 IdCreatedOn: 28-02-2015 04:40:55 #BELOW IS THE COMMENTS PERL CHOKES ON EVERY 5k lines with LDIF MODULE # search result # search: 2 # result: 0 Success control: 1.2.840.113556.1.4.319 false BLAHBLAH # extended LDIF # # LDAPv3 # base <ou=help,dc=perl,dc=monks> with scope subtree # filter: (|(Id1=*)(Id2=*)) # requesting: FriendlyId IdCreatedOn # with pagedResults critical control: size=1000 # # userid, help, perl.monks dn: uid=userid,ou=help,dc=perl,dc=monks FriendlyId: crazyID IdCreatedOn: 28-02-2015 04:40:55
Right now it's reading in the file it generates but only gets like a quarter of the way through it then throws an error entry not valid on the line with this: $entry = $ldif->read_entry()my $ldif = Net::LDAP::LDIF->new( "../packages/ldapsearch.ldif", "r") o +r die "file not exits\n"; while( not $ldif->eof( ) ) { my $entry = $ldif->read_entry( );
2017-12-28 Athanasius restored original content and added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::LDAP::LDIF->new Chokes on large LDIF because of comments every 5k lines
by NetWallah (Canon) on Dec 27, 2017 at 20:44 UTC | |
by 3dbc (Monk) on Dec 28, 2017 at 16:34 UTC | |
|
Re: open ldif
by haukex (Archbishop) on Dec 27, 2017 at 20:01 UTC | |
by 3dbc (Monk) on Dec 27, 2017 at 20:30 UTC | |
by 3dbc (Monk) on Dec 28, 2017 at 16:01 UTC |