in reply to result is not listening to if
Hello prospect,
Welcome to the Monastery. I am wondering what you are trying to do with your script. Can you provide us a short description?
I am curious because you ask at user to enter a string. A string could be an int but also could be an alphabetical character string. Having said that, I would also like to point out that character x is not the same as * read here perlop/Operator Precedence and Associativity about the * character and here for the x perlop/Multiplicative Operators.
So having said that as the fellow monk choroba pointed out if you want to compare numbers do not use double quotes e.g. "100", this is not the same as 100. Double quote characters in Perl convert the int to string.
So again back to the original question. What are you trying to achieve?
Are you trying to replicate the string n times, or you just want to multiply integers and then check if the output is bigger than 100?
Help us to help you.
Looking forward to your reply, BR.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: result is not listening to if
by prospect (Acolyte) on Jul 14, 2017 at 13:43 UTC | |
by hippo (Archbishop) on Jul 14, 2017 at 14:09 UTC | |
by prospect (Acolyte) on Jul 14, 2017 at 14:21 UTC | |
by hippo (Archbishop) on Jul 14, 2017 at 14:37 UTC | |
by thanos1983 (Parson) on Jul 14, 2017 at 14:36 UTC |