in reply to How do I get my script to see my modules?

Correct me if I'm wrong, but wouldn't this:

$INC[$#INC++] = "Directory";
Increment the $#INC value AFTER it accesses it?

So in effect you're overwriting the last element, then incrementing the index value.

Originally posted as a Categorized Answer.