>perl -wMstrict -le "my $chr; $chr = \"x this and that y\"; $chr =~ s/(this|that)|(\w+)/\u$1\E$2/g; print \"$chr\n\"; " Use of uninitialized value in concatenation (.) or string ... Use of uninitialized value in concatenation (.) or string ... x This and That y