The spreadsheet is Excel 97-2003 compatible and permissions 777

use strict;
use Spreadsheet::ParseExcel;
print "Content-type: text/html\n\n";   
my $parser   = Spreadsheet::ParseExcel-&gt;new();
print "&lt;br&gt;gets here:".__LINE__; 
my $workbook = $parser-&gt;parse('test.xls');
print "&lt;br&gt;never gets here:".__LINE__; 



Question: Foreign key constrains for Python data structures without using real databases
Answer: Use sqlite. No server to install, and you get foreign key constraints for free. If this was a question of a single pair of tables you could hard-code the checking, but as you've discovered, it gets out of hand when you have to re-implement so much of what a DBMS is designed for.