Copilot
Your everyday AI companion
About 287,000 results
Results near Columbus, Ohio ·
    Upvotes8edited Jun 20, 2020 at 9:12

    use does something very specific:

    It is exactly equivalent to

    BEGIN { require Module; Module->import( LIST ); }

    require also does something very specific:

    If EXPR is a bareword, the require assumes a ".pm" extension and replaces "::" with "/" in the filename for you, to make it easy to load standard modules.

    So, when you say

    use bintest ( .. );

    perl first tries to locate bintest.pm in one of the directories in @INC (which now also contains . and .. thanks to your use lib statements).

    It can't find it, because what you have is bintest.pl.

    Content Under CC-BY-SA license
    Was this helpful?
  1. Why Do I get Can't locate Module/Find.pm in @INC

  2. perl - Can't locate *** in @INC - Stack Overflow

  3. Perl error: Can't locate module in @INC | alvinalexander.com

  4. Question & Answer
  5. perl - cant locate FILE/Find.pm in @INC - Ask Ubuntu

  6. Perl script can't locate Env.pm in @INC - Super User

  7. Can't locate ... in @INC - Perl Maven

  8. Checking to see if a Perl module is in your @INC path

  9. How to change @INC to find Perl modules in non-standard locations

  10. rrdtool - Can't locate RRDs.pm in @INC - Server Fault

  11. Can't locate Config/IniFiles.pm in @INC (@INC contains:

  12. Some results have been removed