in reply to Re: Substituting for each regular exp in a local file
in thread Substituting for each regular exp in a local file
#! perl\bin\perl use strict; use warnings; use WWW::Mechanize; my $mech = WWW::Mechanize->new(); open(FILE, "< file1.html") || print "Unable to open the file file1 \n" +; while (<FILE>) { for my $l ($mech->links) { my $url = $l->url; my $desc = $l->text; my $new = $url; $new =~ s/on\.fe/arax.com/; print "concerning $desc, $url should be $new\n"; # $mech->get( $new ); } } close(FILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Substituting for each regular exp in a local file
by coder57 (Novice) on Dec 24, 2006 at 18:30 UTC |