URI::Find is a Perl module used to find URIs in arbitrary text.
my $finder = URI::Find->new(&callback);
$how_many_found = $finder->find($text);
This module does one thing: Finds URIs and URLs in plain text. It finds them quickly and it finds them all (or what URI::URL considers a URI to be.) It only finds URIs which include a scheme (http:// or the like), for something a bit less strict have a look at URI::Find::Schemeless.
For a command-line interface, see Darren Chamberlain's urifind script. It's available from his CPAN directory, http://www.cpan.org/authors/id/D/DA/DARREN/.