Perl Programming Help:
Doubt in Perl
Jun 6, 2000, 2:50 AM
How to open a .DOC file through a perl program and to copy the same .doc file to other file through Perl program? and also i want to insert this into mysql database.
Kindly reply us soon as the matter is urgent.
Jun 15, 2000, 9:31 AM
Something like this ->
use CGI ();
my $DSN = "DBI:mysql:test";
my $user = "username";
my $pw = "secret";
my $q = CGI->new;
my $dbh = DBI->connect($DSN) or die "Cannot connect: $DBI::errstr\n";
my $query = q!INSERT INTO table_name (column_one)
my $sth = "$dbh->do($query) or die "Could not prepare '$query'. Reason: '$DBI::errstr'";