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

Re: [Omaha.pm] for (@row)



On Tue, Aug 19, 2008 at 11:18 PM, Jay Hannah <jay@jays.net> wrote:
> Less code is easier to read?

I agree, but whenever I glance at code I'm always having to
re-convince myself that the "for (@array) {...}" loop does actually
allow you to update the @array in place.

To cover for people like me, make this your after:

AFTER:
# In-place updates to each line of @row.
for (@row) {
  s/[^ -~]//g;
  s/\s+$//;
  tr/a-z/A-Z/;
}




-- 
"Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from
the Satires of Juvenal
"I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author)
** *** ***** ******* *********** *************