Help for this page
$text =~ s!(.*?)<link=(".*?")>(.*?)</link>!$1<a ref=$2>$3</a>!gi;
$text =~ s!<link=(".*?")>(.*?)</link>!<a ref=$2>$3</a>!gi;