[Omaha.pm] for (@row)

Dan Linder dan at linder.org
Wed Aug 20 09:35:25 PDT 2008


On Tue, Aug 19, 2008 at 11:18 PM, Jay Hannah <jay at 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)
** *** ***** ******* *********** *************


More information about the Omaha-pm mailing list