Hi,

I have a problem with this script, it works perfectly on windows XP but it blocks on Linux Red Hat 7.3 (2.4.20-28.8smp).
It seems to be on the "read_entry()" function.

Do you have an idea ?


#!/usr/bin/perl -w

use Net::LDAP::LDIF;

open(RES, "+>/home/lhelou/scripts/test.log") or die "Impossible d'ouvrir le fichier test.log $! ..!! \n";

$ldif = Net::LDAP::LDIF->new( "/home/lhelou/scripts/index.ldif", "r", encode =>"base64", 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 {
     print "$entry\n";
  }
}
$ldif->done ( );
close(RES);


Thanks in advance.

Lionel

Reply via email to