[Omaha.pm] for (@row)

Jay Hannah jay at jays.net
Tue Aug 19 21:18:05 PDT 2008


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




More information about the Omaha-pm mailing list