in reply to Add current working directory to @INC?

The variable name is spelled @INC, in uppercase.

Modify it as you would any Perl array: unshift @INC, "some/path";

You need to do this before you actually attempt to load any modules in the new path, so you put it in a BEGIN block:
BEGIN { unshift @INC, "some/path"; }

Or, you can use the lib pragma to do this for you:
use lib "some/path";

Finally, in this case as you mentioned, "." is already in the module search path, so you can do nothing. :-)

Replies are listed 'Best First'.
Re^2: Add current working directory to @INC?
by ihb (Deacon) on Jul 18, 2004 at 18:30 UTC

    lib does more than just unshifting. Amongst others, it also removes trailing identical elements.

    Note that thus giving lib something that already exists in @INC will move it to the beginning.

    Under taint mode, "." is not in @INC.

    ihb