|Problems? Is your data what you think it is?|
Re: Creating links in the URLs in a text paragraphby Zaxo (Archbishop)
|on Jun 25, 2007 at 04:19 UTC||Need Help??|
You can use Regexp::Common::URI to detect the the urls in plain text and perform a substitution. Assuming the text is in $_, the following will wrap with anchor tags, with the host as text.
Untested. The /e flag on the substitution executes the CGI::a() function to obtain the substitute. The /g flag makes the substitution for all recognised urls in the text.