[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omaha.pm] for (@row)



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/;
}