in reply to Compare file content with a variable content
you're assigning $string to $modified. To test wether they're equal, use the eq operator:if ($modified = $string) { print "the file is the same";
If you were to compare numbers, you'd use ==.if ($modified eq $string) { print "the file is the same\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (ar0n: use 'eq') Re: Compare file content with a variable content
by Skyhawlk (Initiate) on May 20, 2001 at 11:02 UTC | |