RE: sort by extension
From: Mark A Galbreath (GalbreathMA_at_state.gov)
Date: 07/29/04
- Next message: Charles K. Clarkson: "RE: sort by extension"
- Previous message: James Edward Gray II: "Re: sort by extension"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: "'perl.org'" <perl.org@jpw3.com> Date: Thu, 29 Jul 2004 12:34:44 -0400
But trinaries are so much more elegant than if/else statements.
Mark
-----Original Message-----
From: James Edward Gray II [mailto:james@grayproductions.net]
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 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
> ?: (which I also prefer not to use, along with unless). At least map
> is a
> word instead of a (cryptic) token.
Just for the sake of completeness.
COND ? TRUE CODE : FALSE CODE
is generally the same as
if (COND) { TRUE CODE; }
else { FALSE CODE; }
James
-- To unsubscribe, e-mail: beginners-unsubscribe@perl.org For additional commands, e-mail: beginners-help@perl.org <http://learn.perl.org/> <http://learn.perl.org/first-response>
- Next message: Charles K. Clarkson: "RE: sort by extension"
- Previous message: James Edward Gray II: "Re: sort by extension"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|