in reply to Determining if SQLite db exists

You can use the -f operator to check if a file exists. (See perldoc -f -X for information on all the filetest operators.

sub connectdb { die "Database file does not exist" unless -f "as2con.db"; my $dbase = DBI->connect("dbi:SQLite:dbname=as2con.db", "", "", {PrintWarn => 0, PrintError => 0}); return $dbase; }

By the way, module names should start with an uppercase letter. Lowercase module names are reserved for Perl pragmas.