For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > August 2005 > perlstyle









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author perlstyle
Tom Allison

2005-08-02, 10:00 pm

What do they mean by

"Uncuddled elses." in perldoc perlstyle?
Jeff 'japhy' Pinyan

2005-08-02, 10:00 pm

On Aug 2, Tom Allison said:

> What do they mean by
>
> "Uncuddled elses." in perldoc perlstyle?


A "cuddled else" is this kind:

if (...) {
...
} else {
...
}

whereas an uncuddled else is:

if (...) {
...
}
else {
...
}

--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
http://japhy.perlmonk.org/ % have long ago been overpaid?
http://www.perlmonks.org/ % -- Meister Eckhart
Ebgarrett

2005-08-02, 10:00 pm

Uncuddled elses. Found @ http://learn.clemsonlinux.org/wiki/Perl

| /* cuddled "else" */ | /* uncuddled "else" */
| if (x > 0) { | if (x > 0) {
| x += y; | x += y;
| } else { | }
| y += x; | else {
| } | y +=x;
| }

Bonita Garrett

-----Original Message-----
From: Tom Allison [mailto:tallison@tacocat.net]
Sent: Tuesday, August 02, 2005 4:42 PM
To: beginners perl
Subject: perlstyle

What do they mean by

"Uncuddled elses." in perldoc perlstyle?

--
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>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com