Less code is easier to read? j BEFORE: for (0 .. @row - 1) { $row[$_] =~ s/[^ -~]//g; $row[$_] =~ s/\s+$//; $row[$_] = uc($row[$_]); } AFTER: for (@row) { s/[^ -~]//g; s/\s+$//; tr/a-z/A-Z/; }