regexp compilation
alythh_at_netscape.net
Date: 03/30/05
- Next message: PerlFAQ Server: "FAQ 3.1 How do I do (anything)?"
- Previous message: Joe Smith: "Re: Log files in a Date / Time Stamped Directory"
- Next in thread: Arndt Jonasson: "Re: regexp compilation"
- Reply: Arndt Jonasson: "Re: regexp compilation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Mar 2005 02:50:07 -0800
hi all - I'm having some troubles, that seem related to regexp
compilation.
Trying to use the WordNet::SenseRelate module, I get a lot of errors
like the following:
Use of uninitialized value in regexp compilation at
/usr/lib/perl5/site_perl/5.6.1/WordNet/SenseRelate.pm line 1109, <SFH>
line 1.
...
the incriminated line is:
sub _loadStoplist
{
my $self = shift;
my $file = shift;
open SFH, '<', $file or die "Cannot open stoplist $file: $!";
$stoplist{$self} = [];
while (my $line = <SFH>) {
chomp $line;
$line =~ m|/(.*)/|;
push @{$stoplist{$self}}, qr/$1/; # <<<<< LINE1109
}
close SFH;
}
... so $1 comes from a previous pattern match on lines read from a file
at runtime.
I'm not at all an expert in quote-like operators, so I'm not able to
debug this problem - anybody can help ?
thanks1
Alessandro Magni
- Next message: PerlFAQ Server: "FAQ 3.1 How do I do (anything)?"
- Previous message: Joe Smith: "Re: Log files in a Date / Time Stamped Directory"
- Next in thread: Arndt Jonasson: "Re: regexp compilation"
- Reply: Arndt Jonasson: "Re: regexp compilation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|