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 6920725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:11:06+00:00 2026-05-27T10:11:06+00:00

I have a script that uses modules that are external to the standard Perl

  • 0

I have a script that uses modules that are external to the standard Perl library and would like for some way to use them. I don’t have permissions to install them into the Perl lib directory and was wondering if I could just have these external modules reside in my scripts directory.

I have read about using FindBin but it seems to not work. Am I using it correctly?

Right now I want to use 3 modules I want to use (2 being directories). So lets say my script is in Dir1, then my modules will be in a subdirectory of Dir1 called Dir2.

So assuming FindBin finds Dir1, then all I have to do is this?

use FindBin '$Bin';
use Dir2 "$Bin/Dir2";
use Dir2::SubDir_ofDir2_1::Module1;
use Dir2::Module2;
use Dir2::Module3;

My program seems to run but it doesn’t do anything. So I am pretty sure it is not importing the modules correctly.

Thanks

  • 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-05-27T10:11:06+00:00Added an answer on May 27, 2026 at 10:11 am

    The proper way to do it would more likely be either:

    use lib "$FindBin::Bin/Dir2";
    use SubDir::Module1;
    

    or:

    use lib $FindBin::Bin;
    use Dir2::Subdir::Module;
    

    Both would find the files, behavior would then depend on whether the modules declare themselves as inside package Dir2 or not.

    Check out FindBin and lib‘s documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to have a complex form that uses various VBA script files.
I have a Python script that uses built-in modules but also imports a number
I have a script that uses $(document).ready , but it doesn't use anything else
I have a Perl script that uses WWW::Mechanize to read from a file and
I have a Perl script that processes a bunch of file names, and uses
I have a php script that uses Doctrine2 and Zend to calculate some things
I have a simple Python script that uses the socket module to send a
I have a script that uses a simple while loop to display a progress
I have a script that uses BeautifulSoup that I want to make into a
I have a script that uses Parallel::ForkManager . However, the wait_all_children() process takes incredibly

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.