uri-find-simple
01 January 2000
in code
tagged with
[perl]
A perl module to find URIs in a given piece of text, with a simpler interface than URI::Find.
use URI::Find::List qw( list_uris );
my @list = list_uris($text);
my $html = change_uris($text, sub { "<a href=\"$_[0]\">$_[0]</a>" } );
URI::Find is all very well, but sometimes you just want a list of the links in a given piece of text, or you want to change all the urls in some text somehow, and don’t want to mess with callback interfaces. When this happens, I use URI::Find::Simple.
blog comments powered by Disqus