#!perl/bin/perl use win32; use Win32::ODBC; use CGI qw(:standard); $data="ibd_lib.txt"; $test="test.txt"; my (@statement); # array of sql statements my $db=new Win32::ODBC("DSN=bisx;UID=;PWD="); ### report connection status if (!$db) { print "\nunable to connect to database!\n"; die(); } ### Open File for Reading open(FR, "< $data") || die "cannot open $data for reading: $!"; ###open(FW, "> $test") || die "cannot create $test: $!"; while() { ### Write to Database push @statement, "INSERT INTO UserTestingE (ID) VALUES (\t$_\n)"; ### print FW $_; } ### Close the file close(FR) || die "cant close $ibd_lib: $!"; ###close(FW) || die "cant close $test: $!" ### Close the database $db->Close();