Gee, I wonder why it works for me (works extremely well)
use URI; use URI::Find; use strict; use warnings; my $text = <<'__TEXT__'; Hi there, please read http://perlmonks.org/?node=How+to+RTFM. That's http://perlmonks.org/index.pl?node_id=78752. Students can activate their UMSIS userids on-line by filling out and submitting the form at https://umsis.miami.edu/sign-up. ...which can be obtained via the web at http://www.miami.edu/it-forms/ +. Holy snot http://batman.com, would you look at this!?!?! __TEXT__ find_uris($text, sub { my ($find_uri, $orig_uri) = @_; my $uri = URI->new( $orig_uri ); $uri = $uri->canonical->as_string; return '<a href="' . $uri . '">' . $uri . '</a>'; }); print $text; __END__ Hi there, please read <a href="http://perlmonks.org/?node=How+to+RTFM" +>http://perlmonks.org/?node=How+to+RTFM</a>. That's <a href="http://perlmonks.org/index.pl?node_id=78752">http://pe +rlmonks.org/index.pl?node_id=78752</a>. Students can activate their UMSIS userids on-line by filling out and submitting the form at <a href="https://umsis.miami.edu/sign-up">h +ttps://umsis.miami.edu/sign-up</a>. ...which can be obtained via the web at <a href="http://www.miami.edu/ +it-forms/">http://www.miami.edu/it-forms/</a>. Holy snot <a href="http://batman.com/">http://batman.com/</a>, would y +ou look at this!?!?!
Hi there, please read http://perlmonks.org/?node=How+to+RTFM. That's http://perlmonks.org/index.pl?node_id=78752. Students can activate their UMSIS userids on-line by filling out and submitting the form at https://umsis.miami.edu/sign-up. ...which can be obtained via the web at http://www.miami.edu/it-forms/. Holy snot http://batman.com/, would you look at this!?!?!
Must be lucky I guess :-)

update: for emails, try Email::Find (didn't see that coming)

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.


In reply to Re^3: replace url in text with html link by PodMaster
in thread replace url in text with html link by thealienz1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.