in reply to Re^2: WWW::Mechanize link array de-dup
in thread WWW::Mechanize link array de-dup

Presuming he uses the W::M::Link instances then his $mech->get( $foo ) calls should Do The Right Thing™ for relative URLs, but yup very good point about absolutifying before comparing (and the URI::URL instances url_abs returns stringifies sanely when you use it as a hash key, so if you're not going to subsequently pass them on to a get call you could use a variation of your (the OP's)original code: my %seen; @seen{ map $_->uri_abs, @links ) = ();my @out = keys %seen;).

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^4: WWW::Mechanize link array de-dup
by MAC25 (Initiate) on May 08, 2008 at 00:00 UTC
    Thanks Guys
    Used the hash keys as unique and works fine
    Cheers