in reply to Can't find a module that is installed

Everything appears to be sane (less the mention of Forks.pm as opposed to forks.pm in the opening sentence, but that appears to be a simple typo). Can you post the output of perl -v?

Also, does it still break if you do:

cp /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks.pm . perl -E 'BEGIN{unshift @INC, ".";} use forks'

Replies are listed 'Best First'.
Re^2: Can't find a module that is installed
by Weebo (Novice) on Feb 16, 2017 at 19:53 UTC
    Typing habits, I capitalize the first letter, so that should be forks.pm in the first line as well
    $ perl -v This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-li +nux-gnu-thread-multi (with 58 registered patches, see perl -V for more detail) Copyright 1987-2015, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.
    I may be doing this part wrong;
    $ cp /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks . cp: omitting directory '/usr/local/lib/x86_64-linux-gnu/perl/5.22.1/fo +rks' $ perl -E 'BEGIN[unshift @INC, ".";} use forks' Illegal declaration of subroutine BEGIN at -e line 1.
    but the command for MAKER is mpiexec -machinefile /Data/machinefile -n 4 maker maker_exe.ctl maker_opts.ctl maker_bopts.ctl It doesn't explicitly call Perl
      I may be doing this part wrong;
      $ cp /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks .

      You did. The command should be:

      cp /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks.pm .

        ...and this is wrong:

        perl -E 'BEGIN[unshift @INC, ".";} use forks' ^

        That bracket [ should be a brace {.

        However, as anonymonk pointed out, it's much cleaner to write it as:

        perl -I. -E 'use forks'
        Mea culpa, I shouldn't be making simple typos like that. Round 2:
        $ cp /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/forks.pm . $ perl -I. -E 'use forks' Argument "2.53_01" isn't numeric in numeric ge (>=) at forks.pm line 1 +570.
Re^2: Can't find a module that is installed
by Anonymous Monk on Feb 16, 2017 at 20:20 UTC
    perl -E 'BEGIN{unshift @INC, ".";} use forks' #gross #better perl -I. -e'use forks'

      I wasn't sure if -I put the new directory at the beginning of @INC or appended it and was a bit pressed for time to go look at that moment ;)

      After a quick look at perlrun, it indeed does prepend.