|Keep It Simple, Stupid|
Match/Replace/Interpolateby toadi (Chaplain)
|on Jul 21, 2006 at 08:34 UTC||Need Help??|
toadi has asked for the
wisdom of the Perl Monks concerning the following question:
I am a bit stuck here in finding a way how to do this. I'm trying to match some value in some text to get a number <gid=1234>. I want to replace this tag with <img src="PATH/TO/$id"> where the $id will be the number I matched eg. 1234.
Matching and fetching the id is no problem, but trying to replace the correct entry gives me a hassle. Especially when there are more entries in one line.
Some example code:
My opinions may have changed,
but not the fact that I am right