programming-examples/perl/Database/Talking with the Database.pl

10 lines
253 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!\usr\bin\perl
use warnings;
use strict;
use DBI;
my $dbh=DBI->connect('dbi:mysql:test','root','password') || die "Error opening database: $DBI::errstr\n";
print "Hello\n";
$dbh->disconnect || die "Failed to disconnect\n";
print "Goodbye\n";