G'day SuzuBell,
I'm not familiar with Eclipse. I can't you help you with that; however, the problem may not be related to Eclipse.
Your script error "Compilation failed in require" is described in perldiag: as you can see, this is a generic message. I recommend you always use the warnings pragma: use warnings; near the top of your scripts; perl ... -Mwarnings ... -e '...' on the command line. Without knowing what the problem is, I can't tell whether this will provide a more specific message in this instance.
Assuming you're confident that the path to these modules is correctly set up, check that the user running the script has read access to both files.
Next, you should check that the package namespace is correct in both modules and that each module returns a TRUE value (usually just 1; on the last line). They should start and end like this:
package pmFile1; ... 1;
package pmFile2; ... 1;
For your command line example, there's a discrepancy between the code you show ('use pmFile1;' [has ";"]) and the error message you show ("use pmFile1." [has "."]). Perhaps that was just a typo. It's best to actually copy and paste code and output, and put both between <code>...</code> tags. That way, we see a verbatim copy of what you're seeing.
-- Ken
In reply to Re: Error "Compilation failed in require" with "use" syntax
by kcott
in thread Error "Compilation failed in require" with "use" syntax
by SuzuBell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |