Try: if ($file eq $usr) since your comparing strings. FYI, the single "=" is an assignment, -vs- "=="
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nex6 Sent: Wednesday, June 30, 2004 7:00 AM To: perl-win32-users Subject: comparing srtings 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