[EMAIL PROTECTED] 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){
        This is assigning $usr to $file and if $file ture then print.  What you are 
realy trying to do is string compare which would be eq.  To do a numeric compare 
reguires ==.

        So
        if ( $file eq $usr ) {
          # true
       }else {
          #false
       }

Wags ;)

>    print "username: $file;
> 
> 
> -Nex6



*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************


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

Reply via email to