> > Question:
> > I'm trying to use the links(); function which in the man page
> > says "returns a list of the links found in the last fetched
> > page. " However when I try
> >
> > @LINKS = $agent->links();
> > foreach(@LINKS){
> > print "$_\n";
> > }
> > it returns
On Thu, 11 Sep 2003 17:07:14 -0500, "Dan Muey" <[EMAIL PROTECTED]> wrote:
>
> `perldoc perlref` for a tutorial
>
That's the reference. You can also do:
perldoc perlreftut
For a "tutorial". Though I am not sure how recent the Perl needs
> Question:
> I'm trying to use the links(); function which in the man page
> says "returns a list of the links found in the last fetched
> page. " However when I try
>
> @LINKS = $agent->links();
> foreach(@LINKS){
> print "$_\n";
> }
> it returns
>
> WWW::Mechaniz
Each link returned is a WWW::Mechanize::Link object. You need to use the
methods supplied to get the info.
See:
http://search.cpan.org/~petdance/WWW-Mechanize-0.59/lib/WWW/Mechanize/Link.p
m
Use it like this...
@LINKS = $agent->links();
foreach (@LINKS) {
print $_->url(), "\n";
print $_->te