Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by izut (Chaplain)
on Aug 21, 2006 at 17:18 UTC ( #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
Node Status?
node history
Node Type: note [id://568618]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2021-04-23 15:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?