danambroseUK has asked for the wisdom of the Perl Monks concerning the following question:
sub Linker { ($mystring)=@_; @myarray = ($mystring =~ m/(\d\d\d+)/g); foreach $a (@myarray){ $url = "<b><a href='lookup.cgi?id=$a'>$a</a></b>"; $mystring=~s/$a/$url/g; } return $mystring; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Replacing numbers with links
by liverpole (Monsignor) on Jul 16, 2006 at 14:28 UTC | |
by johngg (Canon) on Jul 16, 2006 at 15:36 UTC | |
by GrandFather (Saint) on Jul 16, 2006 at 17:59 UTC | |
by Anonymous Monk on Jul 16, 2006 at 18:03 UTC |