--- Lance Prais <[EMAIL PROTECTED]> wrote:
> Is it possible in Perl to compose and IF Statement as follows:
> 
> 
> if [condition] or [condition]
> 
> Do this
> 
> else 
> 
> Do this

Lance,

Yes, you can do this.  Here's one way:

    my $x = 7;
    if ( $x > 5 or $foo eq 'bar' ) {
        # do this
    } else {
        # do the other thing
    };

Cheers,
Curtis "Ovid" Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

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

Reply via email to