in reply to Help Needed
Is it always dn: ou=CA, or what can be in between dn and CA? Assuming that you read the file line by line, something like
could do.my $value=undef; open(FILE,'<',$filename) or die "$filename: $!"; while(<FILE>) { if(/\bdn:\s*ou=(\w+)/) { $value=$1; last; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help Needed
by scott_apc (Initiate) on Feb 03, 2009 at 12:28 UTC | |
by rovf (Priest) on Feb 03, 2009 at 12:51 UTC | |
by scott_apc (Initiate) on Feb 03, 2009 at 12:57 UTC | |
by rovf (Priest) on Feb 03, 2009 at 14:00 UTC | |
by scott_apc (Initiate) on Feb 03, 2009 at 14:22 UTC | |
|