my sql = qq{SELECT SongTitle, SongPath FROM Songs WHERE (Songs.Artist LIKE '%'||?||'%' OR Songs.Artist LIKE '%'||?||'%' OR Songs.Artist LIKE '%'||?||'%' OR Songs.Artist LIKE '%'||?||'%' OR Songs.Artist LIKE '%'||?||'%' OR Songs.Artist LIKE '%'||?||'%' OR Songs.Artist LIKE '%'||?||'%') )}; my $dbo = DBI->connect("dbi:SQLite:$mediaMonkeyPath","","") or die("Couldn't connect to MediaMonkey - $DBI::errstr\n"); my $sto = $dbo->prepare("$sql") my $results = $sto->execute( @inc_artists ) or die("Failed to Execute SQL");