Re: sort by extension

2004-07-29 Thread Randy W. Sims
perl.org wrote: On Thu, 29 Jul 2004 12:08:20 -0400 (EDT), Jeff 'japhy' Pinyan wrote That's why he broke it down. Is the map() really the problem, or is it the regex, the ?: operator, and the two array references? All of the above ;), but now that I think about it the map looks easiest, then > ?:

RE: sort by extension

2004-07-29 Thread Charles K. Clarkson
perl.org <[EMAIL PROTECTED]> wrote: : Thanks for the detailed response. I know the interspersed : comments won't make some members of the list happy, but : they're just opinions. : : James Edward Gray II wrote: : : Not a "fan" of map() and grep() or just don't understand them? : : Both, didn't

RE: sort by extension

2004-07-29 Thread Galbreath, Mark A
But trinaries are so much more elegant than if/else statements. Mark -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Thursday, July 29, 2004 12:33 PM To: perl.org Cc: Perl Beginners Subject: Re: sort by extension On Jul 29, 2004, at 11:23 AM, perl.org

Re: sort by extension

2004-07-29 Thread James Edward Gray II
On Jul 29, 2004, at 11:23 AM, perl.org wrote: On Thu, 29 Jul 2004 12:08:20 -0400 (EDT), Jeff 'japhy' Pinyan wrote That's why he broke it down. Is the map() really the problem, or is it the regex, the ?: operator, and the two array references? All of the above ;), but now that I think about it the

Re: sort by extension

2004-07-29 Thread James Edward Gray II
On Jul 29, 2004, at 10:42 AM, perl.org wrote: Thanks for the detailed response. Anytime. It's easier to read that code bottom to top, so let's start with: map { m/\.([^.]+)$/ ? [$_, $1] : [$_, ''] } @input; Unfortunately I really don't find this easy to read. That's unfortunate, because I actually

Re: sort by extension

2004-07-29 Thread perl.org
On Thu, 29 Jul 2004 12:08:20 -0400 (EDT), Jeff 'japhy' Pinyan wrote > > That's why he broke it down. Is the map() really the problem, or is > it the regex, the ?: operator, and the two array references? All of the above ;), but now that I think about it the map looks easiest, then ?: (which I a

Re: sort by extension

2004-07-29 Thread Jeff 'japhy' Pinyan
On Jul 29, perl.org said: >> It's >> easier to read that code bottom to top, so let's start with: >> >> map { m/\.([^.]+)$/ ? [$_, $1] : [$_, ''] } @input; > >Unfortunately I really don't find this easy to read. That's why he broke it down. Is the map() really the problem, or is it the regex, th

Re: sort by extension

2004-07-29 Thread perl.org
Thanks for the detailed response. I know the interspersed comments won't make some members of the list happy, but they're just opinions. On Wed, 28 Jul 2004 13:46:07 -0500, James Edward Gray II wrote > > Not a "fan" of map() and grep() or just don't understand them? Both, didn't understand them

Re: sort by extension

2004-07-28 Thread James Edward Gray II
(Let's keep our discussion on the list for all to help and learn, please.) On Jul 28, 2004, at 12:55 PM, John West wrote: James Edward Gray II <[EMAIL PROTECTED]> On Wed, 28 Jul 2004 12:41:08 -0500, James Edward Gray II wrote I'm never one to abuse working code, but if your definition of "better"