#!/usr/bin/perl

while (glob("*.mp3")) {
	unshift (@files, $_);
}

foreach $file (sort(@files)) {
	
	if ($file=~/\.mp3/i) {
		#@date = split(/\./, $file);
		#$date[0]=~/(\d{2})(\d{2})(\d{2})/gi;
		#$date[0]=~/(\d{2})(\d{2})(\d{2})/gi;
		my $year="2012";
		my $day="1";
		my $month="1";
		print "insert into podcast (create_dt,month,day,year,segment,title,location,view_counts) values ('$year-$month-$day',$month,$day,$year,$4,'$file','/data/www/paintyourbaldspot/mp3s/$file',0);\n";
	}

}