Quote:
Originally Posted by fris
foirgot to mention i wanna specify the links based on the h3 tag so <h3>payment links</h3> would grab those links under that h3 element ;)
|
quick mod:
Code:
open(FILE, 'stuff.txt');
$h3 = 0;
$h3str = "payment links";
while(<FILE>)
{
chomp;
if($_ =~ "<h3>$h3str</h3>"){$h3++;}
elsif($_ =~ "<h3>"){$h3 = 0;}
elsif($h3>0){print "$_\n";}
}
close FILE;
this way it will even get the links if they are spread over multiple <h3>payment links</h3> blocks.