in reply to Re: Re: My first package - need help getting started
in thread My first package - need help getting started
This code is almost identical to the code in the synopsis for Net::LDAP::LDIF. I just added a call to Data::Dumper to print the object and its structure.
Here is the modified input file:use strict; use warnings; use diagnostics; use Data::Dumper; use Net::LDAP::LDIF; my $ldif = Net::LDAP::LDIF->new( "file.ldif", "r", onerror => 'undef' +); while( not $ldif->eof() ) { my $entry = $ldif->read_entry(); if ( $ldif->error() ) { print "Error msg: ",$ldif->error(),"\n"; print "Error lines:\n",$ldif->error_lines(),"\n"; } else { print Dumper($ldif); } } $ldif->done();
It should work perfectly the first time! - tomadn: /C=US/A=BOGUS/P=ABC+DEF/O=CONN/OU=VALUE1/S=Region/G=Limbic/I=_/ type: UR flags: DIRM ADMINM ADIC ADIM Alias-2: wL_Region Alias-3: Limbic Region Alias-4: Limbic._.Region@nowhere.com Alias-5: Limbic._.Region Alias-6: Limbic.Region@nowhere.com Alias-7: ORG Alias-8: CMP Alias-10: O=ORG/OU=Some Big Division/CN=Limbic _. Region Alias-11: Region Alias-12: Region, Limbic _ Alias-14: Limbic _. Region at WT-CONN Alias-15: ex:/o=BLANK/ou=ORG/cn=Recipients/cn=Mailboxes/cn=LRegion Alias-16: WT:Limbic_Region Alias-17: SMTP:Limbic._.Region@nowhere.com Alias-18: /o=A.B.C.D./ou=Vermont Ave/cn=Recipients/cn=wt/cn=Limbic_Reg +ion Full Name: Region, Limbic _. Post Office: WT-CONN Description: 999-555-1212 Some Big Company Tel: 999-555-1212 Dept: Some Big Division Location: EMWS Address: 123 nowhere street City: everywhere State: MD Zip Code: 20874 Building: BLAH Building-Code: MD-ABC owner: CONN
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: My first package - need help getting started
by Limbic~Region (Chancellor) on Feb 27, 2003 at 05:53 UTC |