#!/usr/bin/perl -w
use strict;
use DBI;
use lib qw(/home/jeremy/Documents/scripts/);
use tools;

open IN,"dataset";
my @data = <IN>;
close IN;

open OUT,">data.csv";

print OUT "Year,Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec\n";

my $yr = 1775;
foreach my $i (@data){
	my @tmp = split(/\s+/,$i);
	$tmp[0] = $yr;
	my $str = StringTools::linetostr(@tmp);
	print OUT $str;
	$yr++;
}

close OUT;
