in reply to more then one string replacement

Try this instead:
use strict; my @find = ('description', 'Description', 'DESCRIPTION'); my $replace = 'Summary'; foreach my $string (@find) { $string = quotemeta $string; $string =~ s/description/$replace/ig; $string =~ s/=/:/g; }
Since you are using an array, you will need to iterate through the array to make the replacements. I use two seperate regular expressions for two seperate replacements. I moved quotemeta to inside the loop, you can't call it on an array like you did - @find will contain one element that is the number of elements operated on by quotemeta. Now, you can chomp an array ... but you can't quotemeta it (not without a map or for loop at least).

Also, you can't put an array in a regular expression:

s/@array/replacement/
Doesn't do what you think it does ;). Read more about regular expression at perlre. Brew up a pot of coffee and immerse yourself.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)