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; } }
In reply to Re: Help Needed
by rovf
in thread Help Needed
by scott_apc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |