#!/usr/bin/perl



open(IN,"<descriptions.txt");

open(OUT,">pd.txt");

open(SQL,">desc.sql");

while($in = <IN>) {
	chop($in);
	print "in: $in\n";
	($foo,$bar) = $in =~ /^(\d*) - (.*)$/;

	print "foo: $foo\n";
	print "bar: $bar\n";

	$foof = "DCFC00$foo.JPG";

	$foo =~ s/\'/\'\'/g;
	$bar =~ s/\'/\'\'/g;


	if($foo && $bar) {
	print OUT "$foof $bar\n";
	print SQL "INSERT INTO pd VALUES (NULL,'$foof','$bar');\n";

	}

	
}


close(IN);
close(OUT);

