Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Net::LDAP::LDIF->current_lines() seems unworkable in the new version.

Reply
Thread Tools

Net::LDAP::LDIF->current_lines() seems unworkable in the new version.

 
 
Wang Penghui
Guest
Posts: n/a
 
      11-01-2009
#!/usr/bin/perl -w

use Net::LDAP::LDIF;
Hi,

I have a perl script to convert ldif file, put the base64 encoded text
to one line.

Recently it seems unworkable with the follow error:

Use of uninitialized value in print at ./readldif.pl line 14, <GEN0>
line 46735.
Use of uninitialized value in print at ./readldif.pl line 14, <GEN0>
line 46804.
Use of uninitialized value in print at ./readldif.pl line 14, <GEN0>
line 46893.

The OS is debian 5.0.4. And the libnet-ldap-perl is 0.36-1.

I have searched the web for a while but no result, could someone pick
me up?

Here are the script:

$ldif = Net::LDAP::LDIF->new( "source.ldif", "r", onerror =>
'undef' );

while( not $ldif->eof ( ) ) {
$entry = $ldif->read_entry ( );
if ( $ldif->error ( ) ) {
print "Error msg: ", $ldif->error ( ), "\n";
print "Error lines:\n", $ldif->error_lines ( ), "\n";
} else {
if ($entry->dn =~ m/contact/) {
print $ldif->current_lines();
}
print "\n\n";
}
}

$ldif->done ( );

Thanks very much.

Penghui Wang.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is my network unworkable? Luis Ortega Wireless Networking 5 03-02-2008 11:19 PM
New hard drive is a bottomless pit... or so it seems HeXXXagon Computer Information 3 07-22-2006 07:04 PM
Evolution or Revolution? New media seems to break the rule jack@sunrainad.com Computer Support 1 07-02-2006 01:28 PM
NEW FIREFOX 1.0.6...It seems faster and use less memory!! Ron Firefox 3 07-23-2005 02:23 AM
Re: FINAL TRY -- MVPs -- Please just tell me if this is an unworkable BUG!!! Justin SB ASP .Net 2 06-27-2003 04:08 PM



Advertisments