Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How do I get only one item out of attribute?

by mscerra (Monk)
on Aug 21, 2006 at 16:39 UTC ( #568604=note: print w/replies, xml ) Need Help??


in reply to How do I get only one item out of attribute?

The simplest way is to use split.
my @results = split /,/, $branch; my $desiredAtt = $results[1];
If you want the returned value to only be the ou value you might look into making it return a hash of hashes. Your return hash would point to another hash. The sub hash would have three keys, corpid, ou and o. Then you could call
$return{"dn"}{"ou"}
to only get the ou field.

Replies are listed 'Best First'.
Re^2: How do I get only one item out of attribute?
by mr_evans2u (Novice) on Aug 21, 2006 at 18:30 UTC
    thanks, mscerra that worked!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://568604]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2021-05-17 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (157 votes). Check out past polls.

    Notices?