Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by izut (Chaplain)
on Aug 21, 2006 at 17:18 UTC ( [id://568618]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $dn = 'corpid=xxxxxx,ou=people,o=corp';
    my ($ou) = $dn =~ /ou=(.*?),/;
    print "ou = $ou\n";
    
  2. or download this
           Sometimes minimal matching can help a lot.  Imagine you’d like 
    +to match
           everything between "foo" and "bar".  Initially, you write somet
    +hing
    ...
    
               if ( /foo(.*?)bar/ ) { print "got <$1>\n" }
             got <d is under the >
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found