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

  • SEARCH
  • Home
  • 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 9157849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:07:04+00:00 2026-06-17T13:07:04+00:00

I tried to run a perl script inside my other shell script but I

  • 0

I tried to run a perl script inside my other shell script but I have faced the following snag:

Can’t locate new.pm in @INC (@INC contains: /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl

I have specifically set the path where the additional local perl script, i.e, "new.pm" in my Perl script (test.pl) but the error still appears. (perl -V) shows the path of my local Perl. I have further also set the the path of my "new.pm" in my profile file using the command "PERL5LIB".

However, when I run the script on a command line as:

./test.pl 

it does work like a charm.

PS. The she-bang line is properly set.
PSS. Platform: linux, OS_vers=2.6.32-5-amd64

  • 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-17T13:07:05+00:00Added an answer on June 17, 2026 at 1:07 pm

    There are multiple ways to do this, but I don’t think setting the path is one of them. If "new.pm" is in the /my/lib directory, try any of these:

    perl -I/my/lib script-that-calls-new.pl
    

    or

    use lib '/my/lib'; ## add this before "use new;"
    

    or

    BEGIN { push @INC, '/my/lib'; }; ## same as "use lib" example
    

    or

    export PERL5LIB=/my/lib:$PERL5LIB
    

    The path tells your shell where to look for executables. The examples above all tell perl where to find libraries.

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

Sidebar

Related Questions

How can I run telnet inside a shell script and execute commands on the
I have a Perl script and I need to run it as another user
I have written a script that saves the output in a Perl script, but
I'm pretty new to Perl but have been programming in java for several months
I have a simple perl script that uses DBD::Oracle to run a query and
If I run a Perl script from a command prompt (c:\windows\system32\cmd.exe), how can I
I tried to run the following command and it says there is nothing to
I tried to run VBA application on someone else's computer, but I get an
I just tried to run my company's app in the new x86 android emulator,
I received the following error when I tried to run a C# WinForms application

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.