having spent mere loads of hours in apaches error logs this sounds really like a good idea! (though fortunately I haven't had to write CGIs for a good while now :)
Just two little remarks:
- #!/usr/perl/bin -d:ptkdb
This probably should be
in your first call.
Does ptkdb come with perl? Which version? Or do we need to get from CPAN? I can't find it on my system: perl 5.6.0 running on SuSE Linux 7.1 out of the box
you begin bashing the string with a +42 regexp of confusion