Perl - is "uc" enable to use when return to a variable? <p>Just a simple question I want to ask. I am beginner for Perl script, sorry if you feel this question is stupid.</p> <p>The question is can I return a variable and apply "uc" when return.</p> <p>Here is the code:</p> <pre><code>my $desc = ""; @names = ("thor-12345-4567"); $size = @names; Thor(); print $desc; sub Thor() { if ($size ne "0") { return uc ($desc=$names[0]); } $desc = "NA"; return $desc; } </code></pre> <p>I just want to know that is "uc" can be use when we return to a variable?</p> <p>When I try to print $desc, it did not return to uppercase.</p> <p>Thank you very much!</p>