Hello! I just tought I would try to add a limit on the string output to an exercise in the Perl book I'm reading, The excercise was "8 Write a program that prompts for and reads a string and a number (on separate lines of input) and prints out the string the number of times indicated by the num- ber on separate lines. (Hint: use the x operator.) If the user enters “fred” and “3”, the output should be three lines, each saying “fred”. If the user enters “fred” and “299792,” there may be a lot of output." I though that if you put double quoutes around a variable value in Perl, Perl would know for example that "20" is a number. And that if you put variable value between single quotes like this "my $number = '20'. Perl would take it as a literal string. I'll check out those links thank you. Regards
In reply to Re^2: result is not listening to if
by prospect
in thread result is not listening to if
by prospect
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |