> 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::Mechanize::Link=ARRAY(0x84a731c)
> 
> Does this mean it's an reference or does it return and array 
> and I'm just using it incorrectly? 

It is an array reference not an array.

Try this:

        for(@{$agent->links()}) { print "-$_-\n"; }


        or my @LINKS = @{$agent->links()};

        `perldoc perlref` for a tutorial

HTH

Dan

>  If it is a reference is there a good tutorial around for using them.
> 
> Thanks
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to