Thanks guys,
that helped alot!!!


what about doing something like this:

if ($slurp =~ /"defaultusername"="(.+)"/i) {
$usr = $1;
}
else {
   print "no defualtusername entry!! for $file";
}
if ($slurp =~ /"defaultpassword"="(.+)"/i) {
$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?


and thanks!



-Nex6




Nex6 wrote:

I am trying to Compare 2 strings for an if statement in an admin script. $slurp is an entire file, and $file is a name.
what i would like to do is compare the 2, basicly saying if this = that do this otherwise do this. i have the if statement and stuff right i just need help with the compare.




$slurp =~ /"defaultusername"="(.+)"/i;
$usr = $1;
print "printing the value of the test var: $usr\n";
if ($file = $usr){
  print "username: $file;


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


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

Reply via email to