in reply to Anchors, bleh :(

Sounds like you probably could rip it out and replace it with something like Template Toolkit or the like. Just replace your placeholders (I'd call them that before "anchors", which usually brings to mind ^ and \z and related regexen friends in a Perl context) with [% REINSERT.12 %] and populate the template variables accordingly ($template_vars->{'REINSERT'} = \@reinsert_array;). Then you get to let someone else worry about the efficiency bits.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: Anchors, bleh :(
by oko1 (Deacon) on Feb 08, 2008 at 14:46 UTC
    [laugh] I'm not surprised to discover that someone's already automated the thing that I'm doing manually; that's My Life with Perl (although I do tend to check CPAN when things get complex; this wasn't complex, just... intellectually itchy.) I'm just wondering if this kind of approach is the only answer to this kind of problem.