From: Kevin K. <kev...@ua...> - 2000-05-12 21:36:35
|
That worked great!!! Thanks! K > -----Original Message----- > From: Mark Wilcox [mailto:mew...@un...] > Sent: Friday, May 12, 2000 3:31 PM > To: LDAP Mailing List > Cc: Kevin Konowalec > Subject: Re: [Fwd] Quick question > > > Try something like this: > my $status = @{$entry->get('affiliationcode')}->[0]; > > or > my $codes = $entry->get('affiliationcode'); > my $status = $codes->[0]; > > > Mark > > > On Fri, 12 May 2000, Graham Barr wrote: > > > ----- Forwarded message from "Kevin Konowalec" > <kev...@ua...> ----- > > > > From: "Kevin Konowalec" <kev...@ua...> > > To: "Graham Barr" <gb...@po...> > > Subject: Quick question > > Date: Fri, 12 May 2000 11:41:53 -0600 > > X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) > > In-Reply-To: <200...@po...> > > > > > > Hi again... > > > > Quick question: what is the syntax for grabbing individual > fields out of a > > returned record? None of the docs really show how to use the > get() method. > > Is there anywhere that I can find simple example programs that uses the > > perl-ldap modules? > > > > For example, in perldap, I'd do something like this: > > > > > > $entry = $conn->search("$BASEDN","ONE","($filter)"); > > if (!$entry) { > > die "Unable to find any records matching $filter\n"; > > } > > > > $status = $entry->{affiliationcode}[0]; > > > > > > What would the equivilant syntax be in perl-ldap? > > > > Thanks!! > > > > Kevin > > > > > > ----- End forwarded message ----- > > > > > > |