Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: Getting err...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 10 Topic 10995 of 11401
Post > Topic >>

Re: Getting error - Global signal requires explicit package name

by stpra123@[EMAIL PROTECTED] (Hotkitty) Apr 30, 2008 at 08:41 PM

On Apr 29, 8:40=A0am, nore...@[EMAIL PROTECTED]
 (Gunnar Hjalmarsson) wrote:
> hotkitty wrote:
> > I've fixed the issue by reinstalling PERL. However, I am now getting
> > the error message saying: Use of uninitialized value in pattern match
> > (m//) at cctest.pl line 26.
> > (Line 26 is "if ($tag =3D "a href" && "
>
> I already addressed that issue.
>
> http://www.mail-archive.com/beginners%40perl.org/msg93687.html
>
> --
> Gunnar Hjalmarsson
> Email:http://www.gunnar.cc/cgi-bin/contact.pl

Thank you. I have the script up and running, thanks to your input.
Now, I want to switch it up a bit. I ultimately want to go to cnn.com/
politics, follow all links under the "Election Coverage" headline and,
w/in those links, save all the links under the "Don't Miss" sections
that appear in those stories. However, after many hours and trial &
error I've yet to complete the task. I know mechanize can do this
somehow but I've yet to figure out how to put it all together. Here's
the script I have so far, which gets me to only step one:



use LWP::Simple;
require HTML::Parser;
require HTML::LinkExtor;
use warnings;


$Domain =3D "cnn.com";
$URL =3D get("http://www.cnn.com/politics/");


mkdir "$Domain";


$LinkExtor =3D HTML::LinkExtor->new(\&links);
$LinkExtor->parse($URL);


sub links
    {
        (undef, %links) =3D @[EMAIL PROTECTED]
        if ($links{href} &&
                $links{href} =3D~ "2008") {
        $url =3D $links{href};
        $file =3D $url;
        $file =3D~ s/http:\/\/www\.//;
        $file =3D~ s/http:\/\///g;
        $file =3D~ tr/\//-/;
        mirror ($url, "$Domain/$file.html");
        print "Making $file.html\n";


    }



}


exit;


___END____


Thanks again!
 




 10 Posts in Topic:
Getting error - Global signal requires explicit package name
stpra123@[EMAIL PROTECTED  2008-04-26 21:11:39 
Re: Getting error - Global signal requires explicit package name
peng.kyo@[EMAIL PROTECTED  2008-04-27 22:20:08 
Re: Getting error - Global signal requires explicit package name
noreply@[EMAIL PROTECTED]  2008-04-27 18:23:52 
Re: Getting error - Global signal requires explicit package name
noreply@[EMAIL PROTECTED]  2008-04-27 18:24:01 
Re: Getting error - Global signal requires explicit package name
noreply@[EMAIL PROTECTED]  2008-04-28 00:50:00 
Re: Getting error - Global signal requires explicit package name
rob.dixon@[EMAIL PROTECTE  2008-04-28 13:43:37 
Re: Getting error - Global signal requires explicit package name
stpra123@[EMAIL PROTECTED  2008-04-28 16:14:46 
Re: Getting error - Global signal requires explicit package name
stpra123@[EMAIL PROTECTED  2008-04-28 17:49:43 
Re: Getting error - Global signal requires explicit package name
noreply@[EMAIL PROTECTED]  2008-04-29 14:40:16 
Re: Getting error - Global signal requires explicit package name
stpra123@[EMAIL PROTECTED  2008-04-30 20:41:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 7:07:48 CDT 2008.