Sometimes modules just come together in such a way as to make my life very easy and enable me to dazzle the people I work for. In this case, simplified APIs to more complicated functionality: MIME::Lite and Spreadsheet::WriteExcel::Simple. Here's an example of how to create and mail a simple spreadsheet as an attachment. For bonus points, generalize it to get the data from DBI or a Data::Table object.
#!/usr/local/bin/perl5.8.0 -- # -*- perl -*-
my $xls = Spreadsheet::WriteExcel::Simple->new;
$xls->write_bold_row([qw(col1 col2 col3)]);
$xls->write_row([qw(one two three)]);
my $msg = MIME::Lite->new(
From => 'firstname.lastname@example.org',
To => 'email@example.com',
Subject => 'Example: mailing an Excel workbook',
Type => 'TEXT',
Data => <<'EOF',
Here is your example Excel workbook.
Type => 'application/vnd.ms-excel',
Data => $xls->data,
Filename => 'example.xls',