in reply to s// problem

Hmm, I'm not sure what is happening here. I used the following and got the expected results:
#!/usr/bin/perl -w use strict; my %template = ( tag1 => 'test1', tag2 => 'test2', ); my $tmp = "%tag1% went to %tag2%"; $tmp =~ s/\%(\S+)\%/$template{$1}/gi; print $tmp,"\n";
and that produced:
test1 went to test2
What are the results you are getting?

-loc