http://qs321.pair.com?node_id=1002395


in reply to use lib in cgi env

Hello.

FindBin works good to me. And it seems suit for your need well...

It unshift paths to @INC properly for me, and I wonder what is the result of @INC in your case. This will show the result of @INC after use libed.

#!/usr/bin/perl use FindBin qw($Bin); use lib ($Bin,"$Bin/../../mycpan"); print "Content-type: text/html; charset=UTF-8\n\n"; print "$_<br>\n" for @INC;
Here unshift @INC, current directory and relative mycpan directory.

FindBin do good to me.