When you input a string this way: $string1 = <STDIN>;, the string is returned with the newline ("\n"), on the end.
You either need to chomp the string to remove the newline; or add a newline to the string constant you are comparing against.
In reply to Re: Comparing Strings
by BrowserUk
in thread Comparing Strings
by maheshkumar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |