in reply to ref in @INC and debugging

What exactly is your problem?

Reconsider your Problem; Restate it in an understandable way and present readable code.
I'm pretty sure you will gain more rewarding answers then my slightly pis**d off remark.

kind regards,
tomte