#!/usr/bin/perl use strict; use warnings; use DBI; my $dbh = DBI->connect( "dbi:AnyData:testdb", "username", "password", ); my $db_load_file = '/home/user/testdb.log'; DBI->trace(2); doPrepare(); exit; sub doPrepare { my $sth; $sth = $dbh->prepare( "SELECT source FROM $db_load_file" ), $sth->execute; }