c:\@Work\Perl>perl -wMstrict -le "my @SUB_REC = map [ qr{$_->[0]}, $_->[1] ], ( [ '\b(robert|bobby)\b', 'bob (not $1)' ], ) ; ;; my $yourText = 'robert dobbs and roberto jones and bobby hope'; print qq{'$yourText'}; ;; $yourText =~ s{ $_->[0] }{ qq{qq{$_->[1]}} }xmsgee for @SUB_REC; print qq{'$yourText'}; " 'robert dobbs and roberto jones and bobby hope' 'bob (not robert) dobbs and roberto jones and bob (not bobby) hope'