>> Whoops. Actually it didn't work for some reason. The output on the browser
>(not
>> the source) looks like:
>>
>> This: <a href="http://www.blah.com">http://www.blah.com</a> is a url
>>
>
>Embperl by default escapes your output i.e. < will become &lt; You need to
>set $escmode to zero, e.g.
>
>
>[+ local $escmode = 0 ; $text +]
>
>Gerald
>
>

Thanks again Gerald. I'll have to experiment with that. I've also since come up 
with another solution to accomplish what I wanted to do and it works great:

[-
$text = 'This: http://www.blah.com is a url and so is this: http://www.fun.com';
@words = split(/ /, $text);
-]

[$ foreach $word (@words) $]
[$ if $word =~ /http\:\/\/\S+/i $]
        <a href="[+ $word +]">[+ $word +]</a>[+ " " +]
[$ else $]
        [+ "$word " +]
[$ endif $]
[$ endforeach $]

- Gavin

"People are the worst drivers in the world" 
http://www.singlespeedsanonymous.com/

Join PayPal and get FIVE FREE DOLLARS (no joke!):
https://secure.paypal.x.com/refer/pal=gavinspomer%40hotmail.com
... and it's a very usefull account to have!




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to