#!/usr/bin/perl
do './money.pl'; # use strict and warnings is defined in money.pl
my $balance = 0;
print $cgi->header;
print "<html><body>\n";
print "<table>\n<tr><td width=100>Date</td><td width=60>Type</td><td width=350>Description</td><td width=80>Withdrawl<td width=80>Deposit</td$
my $csvdata = parse_csv("/tmp/usbank.csv");
foreach(@{$csvdata}) {
print "<tr><td>$_->{date}</td><td>$_->{type}</td><td>$_->{descr}</td>";
if($_->{amount} > 0) {
print "<td><br></td><td>$_->{amount}</td>";
} else {
print "<td>$_->{amount}</td><td><br></td>";
}
$balance += $_->{amount};
print "<td>$balance</td></tr>\n";
}
print "</body></html>";
money.pl is an include file that contains the parse_csv() function which pulls apart each line of the downloaded CSV and pushes it into an array as an anonymous hash.
-- Andrew Gaffney Network Administrator Skyline Aeronautics, LLC. 636-357-1548
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>