#!PERL-LOCATION-GOES-HERE # Display script errors. use CGI::Carp qw(fatalsToBrowser); my $directory = "/directory/"; my $data_file = "file.txt"; open(MONSTREET, "$directory$data_file") || die("Could not open file!"); @raw_data=; close(MONSTREET); my $street = ""; my $accidents = 0; my $traffic = 0; my $emergancies = 0; my $cap = 0; my $blocks = 0; my $compsumption =0; # Begin the page. print "Content-type: text/html\n\n"; print qq~ Streets
~; # Start building the street list here. foreach $streetdata (@raw_data) { chop($streetdata); ($street,$accidents,$emergancies,$traffic,$cap,$blocks,$compsumption)=split(/\|/,$streetdata); print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; } # end building the street list here print qq~
Road Name A T E
$street$accidents$traffic$emergancies

~;