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

my $file = FileTools::getFilename();

my $newfile = $file;

substr($newfile,index($newfile,"\."),length($newfile)) = ".csv";

print "$newfile\n";

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

open OUT,">$newfile";

foreach my $i (@data){
	$i =~ s/\t/,/g;	
	print OUT "$i";
}

close OUT;
