my $now_string = strftime "%a %b %e %H:%M:%S %Y", localtime; print "starting $now_string\n"; # ************* Open the files, read the entire database, write the HTML file open OUTFILENAME, ">$outfilename" or die "Cannot open $outfilename for write :$!"; #open file # or report why we cannot open the file print OUTFILENAME " UTS Available for Sale

UTS Trucks Available for Sale

generated $now_string

\n"; print OUTFILENAME ""; print OUTFILENAME ""; print OUTFILENAME "\n"; my $table = new XBase '/mnt/fdrive/UNITS.dbf' or die XBase->errstr; print "File $dbasefiletoread ",$outfilename," opened successfully\n"; for (0 .. $table->last_record) { # print "inside loop\n"; #print "$dropit\n"; my @data = $table->get_record($_); if ($data[22] && $data[91] eq "UTS" && $data[95] eq "WPI" && !$data[0]) { no warnings 'uninitialized'; print OUTFILENAME ""; print OUTFILENAME "\n"; } } print OUTFILENAME "
UnitModelMakeYearSpecEngine/HPTransRear Axle / Ratio / Susp.MilesWBColorVinLocationCust/DescPrice
$data[55]","",$data[1],"-",$data[26],"",$data[2],"",$data[3]; print OUTFILENAME "",$data[86],"",$data[9]," / ",$data[61],"",$data[21],""; print OUTFILENAME $data[15]," / ",$data[17],"",$data[81],"",$data[16],""; print OUTFILENAME $data[20],"",$data[94],"",$data[64],"",$data[89],"",$data[37],"
\n"; close OUTFILENAME; print "File $outfilename written successfully\n"; $now_string = strftime "%a %b %e %H:%M:%S %Y", localtime; print "finished $now_string\n";