in reply to regex question

use strict; use warnings; use WWW::Mechanize; my $url = 'http://cpan.org/'; my $mech = WWW::Mechanize->new(); if ( $mech->get( $url ) ){ for my $l ( $mech->links() ){ print "link ", $l->url; } } __END__

Replies are listed 'Best First'.
Re^2: regex question
by Anonymous Monk on Jul 10, 2007 at 11:11 UTC
    I've tested both methods,and the regex one has some limitations, so I think the mechanise method looks more robust.
    Using the mechanise method, how would you do the replacement using foo?