$html =~ s/(.*?)/&change($1, $2, $3)/isge; must be $html =~ s/(.*?)<\/a>/&change($1, $2, $3)/isge; #### ----------------------------------- --the good, the bad and the physi-- -----------------------------------
## ----------------------------------- --the good, the bad and the physi-- -----------------------------------