in reply to Active Directory Object Handles

my @list; foreach my $hand ( in $ou_hand ) { next unless $hand->{Class} eq $type; push @list, $hand; }; return [ @list ];
would be better (i.e. more perlishly) written as
[ grep { $_->{Class} eq $type } in $ou_hand ]

Replies are listed 'Best First'.
Re^2: Active Directory Object Handles
by girarde (Hermit) on May 31, 2007 at 16:08 UTC
    You're right. But when I said "trivial addition", though, I wasn't kidding. I just deleted the part of their AD_enumerate method that got the name, and returned the handle.:-)