#!/usr/local/bin/perl use DBI; sub mysql_connect { my $database = 'blubb'; my $hostname = 'blubbdiblubb'; my $dsn = "DBI:mysql:database=$database;host=$hostname"; my $user = 'root'; my $pass = 'blubber'; my $dbh = ''; $dbh=DBI->connect($dsn, $user, $pass, { RaiseError => 1, AutoCommit => 1 }) or die "Verbindung fehlgeschlagen: DBI:errstr"; return $dbh; } my $dbh = mysql_connect(); $dbh->do("DELETE FROM sessions WHERE id = '1f43f0a48a0991227b7d71eba1e372d9'"); $dbh->disconnect;