http://www.perlmonks.org?node_id=1021949


in reply to Add directry to @INC system wide

I add the following to my programs
use FindBin qw($Bin); use lib "$Bin/lib";

Then you can use any module(s) located in the ./lib directory.
-Kiel

Replies are listed 'Best First'.
Re^2: Add directry to @INC system wide
by ikegami (Patriarch) on Mar 07, 2013 at 00:55 UTC
    Using $RealBin instead of $Bin means your program won't break if you create a symlink to the script.