in reply to Can't locate module in @INC
use Cwd qw( realpath ); use File::Basename qw( dirname ); my $script_dir; BEGIN { $script_dir = dirname(realpath($0)); } use lib $script_dir; [download]
It's in your script, but nothing's hardcoded. Otherwise, consult your web server's documentation on how to set an environment variable for the CGI script.