Is there a way to use a variable as modifier in a substitution?
my $search = 'looking';
my $replace = '"find: $1 ="';
my $modifier = 'ee';
s/$search/$replace/$modifier;
I need to use an array of hashes to make bulk search-replace with different modifiers.
Hm, if I had to do it I would do like this:
There are only so many different modifiers you might want to use so I think this is easy enough.
You can use
evalfor this, but it’s awfully messy.