- or download this
my @variables = $_ =~ m/<\?--(\S+?)-->/g;
- or download this
my @variables = $line =~ /<\?--(\S+?)-->/g;
- or download this
my @variables = /<\?--(\S+?)-->/g;
- or download this
for my $variable ( @variables ){
# replace the tag with the value of the variable
# if there is one.
s/<\?--$variable-->/$$variable/g if $$variable;
}