foreach ($a, $b, $c, $d) { tr/a-z/A-Z/; } #### for my $i ($a, $b, $c, $d) { $i =~ tr/a-z/A-Z/; }