$line =~ s/<a href=\"(.*?)\">//gis;
$line =~ s/<a href="(.*?)">//g;
$line =~ s/<\/a>//g;
What if the page contains <a name="dsfds">...</a> tags as well? It would strip out the </a> that don't belong to href's and leave you with a page that's not proper HTML anymore. To strip out all <a href="">...</a>'s I might suggest to first read the entire page into a single scalar called $text and then
$text =~ s,<a\s+[^>]*href=[^>]*>(.*?)</a>,$1,gis;
That should work for all sorts of variations of the <a href...> such as <a target='window' HREF='/some/url.html'>. Now you can use single quotes, double quotes, no quotes, multi-line links, upper/lowers, weird field orders, etc. But an <a name=...>...</a> tag should be passed over.
Anyhow, this might all be moot as the original poster said
<<I need to remove the hyperlink of a GIVEN text, text will be shown without hyperlinks.>> As if to say, don't clobber every single link, just the ones that link a GIVEN text-phrase.
If that is what we're looking for, then I would suggest this
$text =~ s,<a\s+[^>]*href=[^>]*>\Q$phrase\E</a>,$phrase,gi;
where $phrase is the phrase that you are delinking.
In my own work I've usually wanted to delink a certain URL, e.g. to make it so that no page has a link to itself.