On Tue, Nov 18, 2003 at 11:55:01AM +0100, Julian Mehnle wrote: | Steve Lamb wrote: | > 2: Can you provide an example of such free-style coding that you speak | > so highly of? | | # Split header into separate header lines, dropping any unneeded or | # spurious header lines: | @header_lines = grep( | ( | /^(?: | # Wanted headers: | X-Spam-Status | ):/ix or | !/^(?: | # Unwanted headers: | Delivered-To | | Path | | Priority | | Received | | Return-Path | | (?: # Prefixes: | List | | X | )-[\w-]+ | ):/ix | ), | split(/\n(?!\s)/, $header_unwrapped) | ); | | I call that readable, but I guess somebody won't. ;-)
I can more-or-less follow it and I don't speak Perl. :-) Python's parser wouldn't object to that, BTW, because it's all one expression - the following, for instance, is legal (although ugly) Python: if ( 1 + 1 == 2 ): print "hi" Cameron. PS. I'll try to stop posting in this thread now. Really....