die "Filename??\n" unless ($ARGV[0]);

open (FILE, $ARGV[0]) || die "Couldn't open file!\n";

$record_no = 1;

while (<FILE>) {
    if (/\/\?[^.]+\.(.+?)" target=_new><I>(.+?)<\/I><\/A><\/B><BR><FONT size=-1>(.+?)<\/FONT>/) {
	print "insert into my_table values ($record_no, '$1', '$2', '$3', flag_1, flag_2, additional_text);\n";
	$record_no++;
    }
}

close (FILE);
