Well, honestly, I haven't used Perl ... So, am unable to be of much help ...
Do you use DBI module to 'talk' with DB2 or do you do as a command line ?
Can you post an example piece of code you are trying to execute ? It will be useful if you can post a small program that can be run on its own ..
Sathyaram