Nex6 wrote:
> Thanks guys,
> that helped alot!!!
> 
> 
> what about doing something like this:
> 
> if ($slurp =~ /"defaultusername"="(.+)"/i) {

"(.+)" should probably be "(.+?)" to limit the match to the shortest
path unless you know there are no more "s after it.

The RE will try for the longest match without the ?.

> $usr = $1;
> }
> else {
>     print "no defualtusername entry!! for $file";
> }
> if ($slurp =~ /"defaultpassword"="(.+)"/i) {

Same here.

> $pass = $1;
> }
> else {
>     print "No default password entry!!!!";
> }
> 
> as part of a larger script is that safe? becuase the $pass and $usr 
> would be processed in the Larger part of the script. ?
> 
> 
> thoughts?


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to