[thelist] RE: Perl Script (Jim Davis)

jskerlec at webcosmos.com jskerlec at webcosmos.com
Mon Oct 29 08:35:56 CST 2001

Jim Davis <jdavis at hy-tech.net> wrote:
> The script itself is a classic Mortgage calculator.  The problem
> with it is that it generates too many closing </TABLE> Tags.
> Here is a partial output of the HTML where the problem is 
> <li><b>FOR 2011 : Int=$    7051.68 Prin=$    1963.52 Bal=$  
>          84397.98</b></table>
> <li><b>FOR 2012 : Int=$    6883.42 Prin=$    2131.78 Bal=$ 
>          82266.20</b></table>

Jim, it looks like the script was designed to format its output 
as individual (bulleted) lines, and that you are wrestling with
changing the output format into a table/cell layout.  Yes?

Based on the code contained in your post, I ran the script... but
the resulting page it returned didn't  yield the <html> problem
you described.  Perhaps you'll achieve your desired layout if
you edit a few more lines of the script.  As-is, list item tags are
being output half the time, and cell tags the rest of the time:

              if ($outt =~ /Table/) { print "</table>\n"; }
              if (!($outt =~ /Table/)) { printf("<li>  <<<snip>>>
                     else { printf("<tr><td align=right> %3s <<<snip>>>

More information about the thelist mailing list