From: Mark W. <mew...@un...> - 2000-08-29 21:41:26
|
That means you didn't get back a file handle try doing my $ldif = new .... || die("failed to open file $ldif_file. $!\n"); that will die and tell you the reason why it failed to create the filehandle. mark On Tue, 29 Aug 2000, Bing Du wrote: > The following code piece gave the following error. > > =============================== > #!/usr/sbin/perl > > use Net::LDAP::LDIF; > > $ldif_file = "/var/md/dsa/master/dump/mailusers.dump"; > > $ldif = Net::LDAP::LDIF->new("$ldif_file","r"); > > while ( $entry = $ldif->read() ) { > $entry->dump; > } > > $ldif->done(); > ============================== > > Can't call method "read" without a package or object reference at > ./for-keith-ph > .pl line 19. > > Acctually, most part of the above code was from 'perldoc > Net::LDAP::LDIF'. Can anybody tell me what I did wrong? > > Thanks, > > Bing > |