Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

modules and @INC

Status
Not open for further replies.

Graziella

Programmer
Jul 8, 2004
38
AT

Hello,

I am trying to use a module, but I get this error
Can't locate Lingua/EN/Sentence.pm in @INC (@INC contains:...)

How do I get @INC to recognize the module ?

Thanks,

Grazia
 
Hi,

it still does not recognize the module and thinks that the module is a non-defined subroutine.

GRazia
 
Are you still receiving the same error? If not, please post your code so we can help you with this issue.

- Rieekan
 
The module is
Lingua::EN::Sentence

I actually do not know what :: indicate. Do they separate directories and subdirectories ? Probably, since at the beginning of the module, I see "package Lingua::EN::Sentence".

use lib 'directory where module is';

my $sentences=get_sentences($text); ## Get the sentences.
foreach my $sentence (@$sentences) {
foreach $pattern(@my_list_of_patterns) {
if ($sentence =~ /\Q$pattern/){
print "MATCH $sentence\n";
}

}
}


Tahnk you for any help
 
Yes, the `::' seperate subdirectories.

If the module is installed in `/home/username/modules/Lingua/EN/Sentence.pm', then your `use lib' line should be `/home/username/modules'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top