Next time, please be more specific about what your exact problem is, instead of letting us guessing it.
Also give a good title next time, this one doesnt say one thing about what your problem is either. Try with newbie problem with <whatever it is you have a problem with>...
#!/usr/bin/perl
use strict; #Enable stuff to prevent you from doing many stupid things
use warnings; #give me warnings when i do make stupid things, that are
+ not that stupid.
print "How many would you like to calc?\nEX. 10, 100, 1000 :" ;
my $howmany = int <STDIN>; #convert the read in to a number, we dont a
+ctually check it, but if its not a number, we read 0
for my $outer (1..$howmany) {
for (2 .. 10) { #alias the number to $_
my $answer = $_ * $outer;
print "|$_ * $outer = $answer|";
}
print "\n";
}
T
I
M
T
O
W
T
D
I
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|