in reply to Re: In-place editing of files
in thread In-place editing of files

my first run at this problem actually landed me with something like that, but it lacked the grace of a good hack. deciding that a concise solution was not to be found with this problem, i chose to try and compensate with legibility.

here's that awkward first solution of mine using the temp val:

s/ ( ^Tag \s+ \{ [^\}]* \n \s+ Name \s+ \") (.*?) (\" [^\}]* \} ) /join '', $1, despace($2), $3 /emsgx; print; sub despace { my $x = shift; $x =~ s/ //g; return $x; }