How to write a script if found "<a href" in a html file then copy the line until "</a>" match to another html file?
exam:
open (FILE, "test.html);
@lines=<FILE>;
close (FILE);
foreach $line (@lines) {
if ($line=~ /<a href/) {
# if found "<a href" then copy all of the line until "</a>" to $getline
print "$getline"; #print the line here
}
}
exam:
open (FILE, "test.html);
@lines=<FILE>;
close (FILE);
foreach $line (@lines) {
if ($line=~ /<a href/) {
# if found "<a href" then copy all of the line until "</a>" to $getline
print "$getline"; #print the line here
}
}