in reply to replacing all strings of numbers with a link

It's a straight global substitution,

$s =~ s!(\d+)!<a href="http://www.$1.com">$1</a>!g;

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: replacing all strings of numbers with a link
by keiusui (Monk) on Jun 21, 2006 at 01:27 UTC
    Awesome; thanks so much! I was missing the plus sign in my original code, so every single digit would be replaced instead of every string of digits. You rock.