...
This noncompliant code example contains a variable $new_name
that is initialized , but never subsequently read.
Code Block | ||||
---|---|---|---|---|
| ||||
sub fix_name {
my $name = shift;
my $new_name = $name;
$name =~ s/^([a-z])/\U$1\E/g;
$name =~ s/ ([a-z])/ \U$1\E/g;
return $name;
}
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
sub fix_name {
my $name = shift;
$name =~ s/^([a-z])/\U$1\E/g;
$name =~ s/ ([a-z])/ \U$1\E/g;
return $name;
}
|
...