Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8581713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:07:08+00:00 2026-06-11T21:07:08+00:00

I am a new guy learning perl and working as it goes. I am

  • 0

I am a new guy learning perl and working as it goes. I am really stuck at this point, been working on this thing for past 4 Hr without any results.

I am using a bunch of custom Modules inside a directory and then I got a ticket to implement a new KnowledgeBase and so I added a new module in the Moduledirectory. After adding it, when I try to access MyModule it does not work at all. I get

Can't locate FolderName/MyModuleName.pm in @INC 

Can someone please help me. It is getting really annoying. I have tried to restart apache server, but still the same error shows up.

I also tried to just compile my module, but I get the same error except the name of the module is different it is the one that I am calling/using in MyModule.

Please let me know if you can help me. Thanks in advance.

Edit: Adding more details, the exact error that I am getting (with line breaks for readability) is:

Can't locate Net2Net/KnowledgeBase.pm in @INC (@INC contains:
    (DOCUMENT_ROOT)/bin 
    /usr/local/lib/perl5/5.8.8/sun4-solaris
    /usr/local/lib/perl5/5.8.8
    /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.8.8
    /usr/local/lib/perl5/site_perl
    .
) at /data1/web/intradev.com-80/docs/gss/kb/ajax-kb-update.cgi line 6.
BEGIN failed--compilation aborted at /data1/web/intradev.com-80/docs/gss/kb/ajax-kb-update.cgi line 6.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:07:09+00:00Added an answer on June 11, 2026 at 9:07 pm

    The file is located at

    /data1/web/intradev.com-80/docs/bin/Net2Net/KnowledgeBase.pm 
    

    But Perl searches the following locations (assuming cwd is /, which is likely for an CGI under apache):

    /(DOCUMENT_ROOT)/bin/Net2Net/KnowledgeBase.pm 
    /usr/local/lib/perl5/5.8.8/sun4-solaris/Net2Net/KnowledgeBase.pm 
    /usr/local/lib/perl5/5.8.8/Net2Net/KnowledgeBase.pm 
    /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/Net2Net/KnowledgeBase.pm 
    /usr/local/lib/perl5/site_perl/5.8.8/Net2Net/KnowledgeBase.pm 
    /usr/local/lib/perl5/site_perl/Net2Net/KnowledgeBase.pm 
    /Net2Net/KnowledgeBase.pm
    

    As such, Perl cannot find it. You have to tell it to look in

    /data1/web/intradev.com-80/docs/bin
    

    You can do that by adding

    use lib '/data1/web/intradev.com-80/docs/bin';
    

    to your .cgi. (Other ways include using the -I command line option and env var PERL5LIB. See perlrun.) It looks like someone tried to do that (or equivalent), but messed up by doing (the equivalent of)

    use lib '(DOCUMENT_ROOT)/bin';   # Wrong!
    

    The following would also work if you want to use a relative path:

    use Cwd            qw( realpath );
    use File::Basename qw( dirname );
    
    use lib dirname(realpath($0)).'/../../bin';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to Regex. I want to validate to this format: Any character allowed, except
I stumbled on this command while learning AJAX. The guy who made the tutorial
I am a new guy in R and really unsure how to filter data
I'm a new guy in this field and i have a problem when i
i am new guy with XML. this is my XML file content: <Root> <COMPANIES>
our office just got this new guy with lots of experience and kept insisting
hi i am a totally new guy on JAVA OO concepts ,and this is
I've been learning Zend and its MVC application structure for my new job, and
I just started studying C++, and I met this new guy: ->. I was
So I am an old web forms guy and new to the MVC (in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.