www.stonehenge.com (fwd)

Gary Ansok gansok at digisle.net
Thu Aug 31 11:08:33 CDT 2000


SPOILERS below, so don't read if you want to try to figure Randal's code
out yourself!

















Interesting...

Randal's code is
my @column_def = map [ m{^(\S+)\s+(.*)} ], <<'END_DEFINITION' =~
/(.+)/g;

followed by a here-document containing lines like
Name     perl-mongers group name

I might have written it as 
my @column_def = map [ split ' ', $_, 2 ], split /\n/,
<<'END_DEFINITION';

This seems a lot clearer to me.  I think it's the same result (it looks
the same when I print it).  But TMTOWTDI, of course!

The only part of Randal's code that I would call _really_ obscure
is the /(.+)/g at the end.  

-- Gary



More information about the Thousand-oaks-pm mailing list