So what kinds of things go into $FindWhat and how is that different than @Column's hashes? Why don't you try out Text::Template? It already does this stuff and without having to invent your own parser.
If all else fails, you could track what $-[0] and $+[0] are when you copy $1 and later use substr() to write back to $Template at those offsets with your replacement.
I don't buy your argument about not using s/// on the grounds that it appears you're rejecting it on some faulty assumptions. Regardless, here's a s///ge alike without actually using s///.
# Ala my $region_start = $-[0]; my $region_length = $+[0] - $-[0]; my $OriginalLine = $1; ... substr $Template, $region_start, $region_length, $ReplacementString;
In reply to Re^3: Problem Replacing Previously Found String
by diotalevi
in thread Problem Replacing Previously Found String
by NateTut
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |