$text =~ s!#a#(.*?)#/a#!sprintf("<a href=\"s.cgi?word=%s\">$1</a>",((local $tmp=$1)=~s/(\W)/'%'.unpack('H2',$1)/ge,$tmp)[1])!ges;