[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Perl: exec and $variables



On Sat, Jul 21, 2001 at 10:36:55AM -0500, Andrew Perrin wrote:
> my $template = '^<!-- // begin of news%no% // !-->$';
> my $no = 99;
> my $bla = $template;
> $bla =~ s/%no%/$no/g;
> 
> 
> $replace{no} = 99;
> $bla =~ s/%(.+?)%/$replace{$1}/g;
> 
> Disclaimer: these are trivial and not terribly robust solutions; take them
> as a starting point, not a complete solution.

I didn't do things your way, but I can always re-use your ideas sometime
later. :-)

Thanks for your help!

Sven



Reply to: