[CMI.PM] cgi-lib.pl "not found in @INC"???

Mitch Kutzko mitch at ncsa.uiuc.edu
Thu Apr 21 16:29:35 PDT 2005

Hi -- It's feast or famine, Perlmongers!

Having some "require" trouble that seems to think I want a module, not just
one file.

This code:

#!/usr/bin/perl -w

use strict;

use HTML::Calendar::Simple;
use HTML::CalendarMonthSimple;

my $usingcgi = ($ENV{"HTTP_USER_AGENT"} ne "");
if ($usingcgi) {
        require "cgi-bin.pl";

if ($usingcgi) {
#       &ReadParse;

Produces this error in /var/log/httpd/error_log:

[Thu Apr 21 18:21:00 2005] [error] [client] Can't locate
cgi-bin.pl in @INC (@INC contains:
/usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3
/usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2
/usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl .) at /var/www/cgi-bin/iemscal.pl line 11.
[Thu Apr 21 18:21:00 2005] [error] [client] Premature end of
script headers: iemscal.pl

Here's the directory info:

[mitch at jhereg cgi-bin]$ pwd
[mitch at jhereg cgi-bin]$ ls -l
total 60
-rwxrwxr-x  1 mitch apache  3451 Oct  6  2004 caltest.pl*
-rw-rw-r--  1 mitch mitch   4152 Apr 21 16:52 cgi-lib-iems_old.pl
-rw-rw-r--  1 mitch mitch  15078 Apr 21 18:08 cgi-lib.pl
-rwxrwxr-x  1 mitch mitch   2815 Apr 21 18:20 iemscal.pl*

Why does it think I want to use a module here, instead of just using the
local cgi-bin.pl file?


Mitch Kutzko | mitch at dast.nlanr.net | mitch at ncsa.uiuc.edu | 217-333-1199

More information about the Champaign-Urbana mailing list