I am also using the same method, here it is,
use File::Spec::Functions qw(catdir splitdir canonpath); use FindBin qw($RealBin); BEGIN { my @dirs = splitdir(canonpath($RealBin)); my($path) = grep { -e $_ } ( map { $_ = catdir(@dirs[0 .. $#dirs - + $_]).'/bin/new/' } (0 .. $#dirs) ); unshift(@INC, $RealBin, $path); }
In reply to Re: Add directry to @INC system wide
by vinoth.ree
in thread Add directry to @INC system wide
by myforwik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |