#!/usr/software/bin/perl5.8.8 use strict; use warnings; my $db = 'somedb'; my $dbh = DBI->connect("dbi:SQLite:dbname=$db", "", "", {RaiseError => 1}) or die $DBI::errstr; # doing something here with $dbh... $dbh->disconnect;