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

Re: [Omaha.pm] code reduction



On May 10, 2007, at 5:11 PM, Andy Lester wrote:
On May 10, 2007, at 4:54 PM, Jay Hannah wrote:
my $eot = chr(4); # Perl regex's can't see newlines, so cheat temporarily.

Yes they can.  Look at the /s and /m flags in perlre.

Indeed. Hence my rewrite. I've learned a couple things since 2000.  :)

On May 11, 2007, at 8:02 AM, Sean Baker wrote:
Do you really want to remove an understandable commented section of code
with that?  I'll be ringing you at 3 in the morning.

In this case it seems to me that my 1 line rewrite is more maintainable than the 12 line original. The comments helped me understand what I was doing in the 12 lines, but I think its easier to read what the 1 line version does. Yes? No?

j