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.

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re: result is not listening to if by thanos1983
in thread result is not listening to if by prospect

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.