codestroman has asked for the wisdom of the Perl Monks concerning the following question:
Hi im new to perl, and im currently trying to create, and run my own module.
Here is my module code .pm file
#!/bin/usr/perl use warnings; sub dog { print "roof roof im a dog!\n"; } dog; 1;
and here is my .pl file to run the simple module.
#!/usr/bin/perl use lib '.'; use dog; dog;
Every-time i try to run the code i get this message
$ perl drill.pl Can't locate dog.pm in @INC (you may need to install the dog module) ( +@INC contains: . /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 +/core_perl /usr/share/perl5/core_perl) at drill.pl line 4. BEGIN failed--compilation aborted at drill.pl line 4.
PLEASE HELP!!
2017-11-17 Athanasius added code and paragragh tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl modules
by Discipulus (Canon) on Nov 16, 2017 at 09:04 UTC | |
|
Re: perl modules (Can't locate in @INC)
by hippo (Archbishop) on Nov 16, 2017 at 09:21 UTC | |
|
Re: perl modules
by thanos1983 (Parson) on Nov 16, 2017 at 09:17 UTC | |
|
Re: perl modules
by karlgoethebier (Abbot) on Nov 17, 2017 at 10:12 UTC | |
|
Re: perl modules
by Anonymous Monk on Nov 16, 2017 at 09:07 UTC | |
|
Re: perl modules
by Anonymous Monk on Nov 16, 2017 at 15:16 UTC | |
by Corion (Patriarch) on Nov 16, 2017 at 15:23 UTC |