It's a matter of style, I suppose, but seems kind of pointless to me.  To
each their own...

But to answer your question, you can use a ';' on a line by itself, such as

#!/usr/bin/perl -w
$a = localtime();
if   ($a =~ /Mar/) { 
  print "March\n"; 
} elsif ($a =~ /Feb/) {
  print "February\n";
} else { 
  ;  # do nothing
}

You should definitely put a comment on the ';' line to show your intentions.


-Jeff


--- "Wagner, David --- Senior Programmer Analyst --- WGO"
<[EMAIL PROTECTED]> wrote:
> Tony Esposito wrote:
> > When you have an if-elsif-else situation like below, where there is no
> > action taken on the final 'else', is there a way to just say
> > 'continue' - like one would do in C - or is it considered 'ok' to
> > just leave off the final 'else'?
> > My experience has taught me to include the final 'else' but just add a
> > 'continue' command or NULL.  This is to make the code more readable.
> > 
>       Talking about style and what makes the most sense to you.  I assume this
> is in some type of sub or loop which will finally get out.  To me, I would
> use the else only if I had something else to do otherwise leave off.
> 
>       Wags ;)
> 
> 
> **********************************************************
> This message contains information that is confidential
> and proprietary to FedEx Freight or its affiliates.
> It is intended only for the recipient named and for
> the express purpose(s) described therein.
> Any other use is prohibited.
> ****************************************************************
> 
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to