in reply to Problem with use lib?

You assume that the code is executing in the same directory as the script, which may not be true. Put the full path to the directory in the 'use lib' statement and see if that works.