in reply to appending a unique marker to each url in a file
However, this approach still has all the drawbacks of using a regex to match HTML. Using a proper HTML parser would give you a much more robust solution.$htmlfile =~ s/<a\s+href\s*=\s*(["']?)(http.*?)\1>/ @markers or die "More URLs than markers.\n"; qq{<a href="$2} . shift(@markers) . '">'/gie; @markers and die "More markers than URLs.\n";
|
|---|