If you are having problems with code that does substitution, then you need to actually include that code.
I've always done this type of replacement using something like this:
my %subs = ( word1 => 'replace word1 with this text', word2 => 'replace word2 with this test', ); while($document =~ s/\[(\w+)\]) { my $word = $1; my $rep = $subs{$word} || "!Unknown token: $word!"; $document =~ s/\[$word\]/$subs{$word}/smg; }
In reply to Re: pattern matching
by jasonk
in thread pattern matching
by fasteddie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |