#!/usr/local/bin/perl -w # # This is a small program meant to output a report in xls format use strict; use DBI; use CGI qw(redirect); use Spreadsheet::WriteExcel; my $query = new CGI; # Let's set up the database handle, etc. fixed variables my $user = "jrobiso2"; my $auth = ""; my $db = "dbi:mysql:personnel"; # and now the database handle my $dbh = DBI->connect($db, $user, $auth) || die "Cannot connect!: $!\n$dbh->errstr";