On Jul 10, 2007, at 8:47 AM, Tim Bray wrote:

> Gosh, I think I totally disagree on readability grounds.

let's step back for one moment and think about why we all left perl:

   - wtf is $1 ?
   - wtf is ARGF ?
   - regexes are, of all things, the epitome of snoopy swearing

these are the kinds of magic things that used to send us all  
perdoc'ing to read our own code.

while i use both of those thing in dirty script i keep in ~/bin/ i'd  
never publish them as beautiful.  names are the most important thing  
in programing and terminals are pretty dang wide these days

given that, why not

   pattern =
     %r|GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+)|x

   STDIN.each_line do |line|
     match, date, *ignored = pattern.match(line).to_a
     next unless date
     puts date
   end

i always consider using the magic $vars a sign of temporary perl  
madness.

kind regards.

-a
--
we can deny everything, except that we have the possibility of being  
better. simply reflect on that.
h.h. the 14th dalai lama