$test =~ s/(https?\:\/\/[\S]+)/<a href=\"$1\">$1<\/a>/g;
ではダメ?