I'm having trouble creating a table in a database I created with Perl using dbi sqlite3. Using the code I have below, I want the table to contain port-probes, one line for each source ip and port. I don't know if im doing it properly, the code below does not work for some reason, any help would be greatly appreciated. The code i have is as follows.
#!/usr/bin/perl
use strict;
use DBI;
my $dbh = DBI->connect(
"dbi:SQLite:dbname=test.db",
"",
"",
{ RaiseError => 1}
) or die $DBI::errstr;
$dbh->do(CREATE TABLE probes (
source CHAR(15) NOT NULL,
port CHAR(5) NOT NULL,
PRIMARY KEY (source,port)) );
$dbh->disconnect();