sam lehman wrote:

> so would:
> something ? dosomething : somethingelse ? dosomethingelse : killyourself
> be the same as

Let's not go there--at least not yet.  NOt that I object to suicide
particularly, y'know "dff'runt strokes fer diff'runt folks" an' all, but nesting
conditionals before you have used them properly is not good.

Your speculation below is probably correct, but it is probably not a good use
for your time.  Better to learn how to put it to use than to seek for ways to
abuse it.

>
> if (something){

indent properly, please.

>
>    dosomething();
> } elsif (somethingelse){
>    dosomethingelse();
> }else{
>    killyourself();
> }

For more complicated situations like that presented here, it is much better to
use the second form shown.  I would also recommend the formatting changes shown,
since they make it much more viually clear that this is a complex contidional as
opposed to a series of discrete conditionals that just happen to occur in
sequence.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to