and that produced:#!/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";
test1 went to test2What are the results you are getting?
-loc
In reply to Re: s// problem
by loc
in thread s// problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |