develooper Front page | perl.beginners | Postings from April 2008

Re: Getting error - Global signal requires explicit package name

Thread Previous | Thread Next
From:
Gunnar Hjalmarsson
Date:
April 27, 2008 09:24
Subject:
Re: Getting error - Global signal requires explicit package name
hotkitty wrote:
> I'm trying to extract links from a website but get the following
> error:
> 
> Global symbol "%Config" requires explicit package name at C:/Perl/lib/
> Errno.pm l
> ine 11.
> Global symbol "%Config" requires explicit package name at C:/Perl/lib/
> Errno.pm l
> ine 11.
> Global symbol "%Config" requires explicit package name at C:/Perl/lib/
> Errno.pm l
> ine 13.
> Global symbol "%Config" requires explicit package name at C:/Perl/lib/
> Errno.pm l
> ine 13.
> BEGIN not safe after errors--compilation aborted at C:/Perl/lib/
> Errno.pm line 12
> 9.
> Compilation failed in require at C:/Perl/lib/IO/Socket.pm line 17.
> BEGIN failed--compilation aborted at C:/Perl/lib/IO/Socket.pm line 17.
> Compilation failed in require at C:/Perl/site/lib/LWP/Simple.pm line
> 158.
> 
> What am I doing wrong?

LWP::Simple may not be correctly installed, so I suggest that you 
re-install it.

http://perldoc.perl.org/perlfaq8.html#How-do-I-install-a-module-from-CPAN%3f

> sub links
> {
> 	($tag, %links) = @_;
> 	if ($tag = "a href" &&
> 		$links{href} =~ "$Domain") {

To get rid of the uninitialized warnings, you can replace those lines with

     sub links
     {
	(undef, %links) = @_;
	if ($links{href} &&
		$links{href} =~ "$Domain") {

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About