reuslts:#!/usr/bin/perl -w use strict; my $chr; $chr = "this and that"; $chr =~ s/(this|that)|(\w+)/$1\U$2/g; #error reported print "$chr\n";
this AND that
But it reported error message:
Use of uninitialized value in concatenation (.) or string at test.pl line 5.
I don't known why it reported an error at line 5, since $chr was already declared.
Thanks.In reply to why such an error happened? by lightoverhead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |