in reply to Transfering Varriables

Use a hash to store the substitution values from the one source. Then just sub 'em in. You don't give any information about the source of the values to use for replacements. So I made some assumptions for this quick demo.
#!/usr/bin/perl -w use strict; my %values; # Pretend we have an input file w/values while (<DATA>) { last if /TEMPLATE/; # needed here to separate demo data my ($key, $val) = split; $values{$key} = $val; } # Pretend we have an input file w/template my $template = join '', <DATA>; # Process the fields for my $key (keys %values) { $template =~ s/%$key%/$values{$key}/g; } # Show result print $template; __DATA__ name Roadrunner job running TEMPLATE Hello Mr. %name%. We hope you are good at %job%.
You will need to adapt this to make it more robust and to make it fit your need but this should give you the general idea.

For a more elegant approach to the substitution, replace entire process fields "for" loop with this: $template =~ s/%(\w+)%/$values{$1}/g;

If you are going to get serious about this, I suggest you look into one of the template modules.

------------------------------------------------------------
"Perl is a mess and that's good because the
problem space is also a mess.
" - Larry Wall