ok, I am reading a file, running a regex and if the regex changes something, I save it out.
The code is as follows:
open (IN, "<$fname") || die " '$fname' ($!)";
my
@text = map {$changed += s|<br>|<br />|; $_;}
<IN>;
close (IN);
which converts a <BR> tag to <BR /> required by a strange app.
So now I find a need to do this for another tag (img) so I have the regex to work, but I cannot get it to
work map:
@text = map {$changed += s|<img(.*?)>|<img$1 />|;
@text;}
how do I use map on an array rather than on $_ ?