G'day perl-diddler,
Your problem may be related to which package is current. The error shows "$URL::Cacheable::pkg_host_mask" but your code only uses "$pkg_host_mask" and the current package is not indicated.
What's "P()"? It looks like some sort of wrapper around printf but that's just a guess.
Where does the following statement occur?
$pkg_host_base = ($p->host =~ m{($pkg_host_mask)}) [0];
Unrelated to your current problem, but you have a redundant level of parentheses in that code. I foresee a future SoPW like "Why is this matching twice?".
$ perl -Mstrict -Mwarnings -E ' my $host = q{a.b.c}; my $re = qr{([a-zA-Z][-a-zA-Z0-9]*\.[a-zA-Z]+)$}; my $base = ($host =~ $re)[0]; # How I might have written it say $base; $base = ($host =~ m{($re)}) [0]; # How you wrote it say $base; $base = ($host =~ m{($re)}) [1]; # Fodder for another SoPW say $base; ' b.c b.c b.c
The error has "at ./crawl.pl line 385". Have you posted that line? If so, which is it?
That may be enough for you to resolve your issue. If not, please provide the requested information.
-- Ken
In reply to Re: strange prob--print RE& then use-says not set??
by kcott
in thread strange prob--print RE& then use-says not set??
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |