hemi
09-22-2009, 01:33 PM
#!C:/Perl/bin/perl.exe -w
print "<table border='1'>";
# START THE LOOP, $i is the most common counter name for a loop!
for($i = 1; $i < 5; $i++) {
# PRINT A NEW ROW EACH TIME THROUGH W/ INCREMENT
print "<tr><td>$i</td><td>This is row $i</td></tr>";
}
# FINISH THE TABLE
print "</table>";
-----------------------------------------------------------------------------------------------------------------
when iam compiling file, it is not coming in table format, it is cominig like above ,that means
<table><tr><td>1</td><td>
<tr><td>2</td><td>
<tr><td>3</td><td>
<tr><td>4</td><td> <tr><td>5</td></tr></table>
-----------------------------------------------
it is coming like that only but i want it in table format
plz anyone help me i am new to perl
print "<table border='1'>";
# START THE LOOP, $i is the most common counter name for a loop!
for($i = 1; $i < 5; $i++) {
# PRINT A NEW ROW EACH TIME THROUGH W/ INCREMENT
print "<tr><td>$i</td><td>This is row $i</td></tr>";
}
# FINISH THE TABLE
print "</table>";
-----------------------------------------------------------------------------------------------------------------
when iam compiling file, it is not coming in table format, it is cominig like above ,that means
<table><tr><td>1</td><td>
<tr><td>2</td><td>
<tr><td>3</td><td>
<tr><td>4</td><td> <tr><td>5</td></tr></table>
-----------------------------------------------
it is coming like that only but i want it in table format
plz anyone help me i am new to perl