Heh, I never tried to use "and"? I assumed it wasn't that simple! Problem with learning something from the beginning is I don't even know what that's called so searching the net is rather hard:)
I'll try this! Thanks. jlc -----Original Message----- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Monday, July 02, 2007 11:05 PM To: Joseph L. Casale Cc: beginners@perl.org Subject: Re: Conditional question On 7/3/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: > I want to script an "if" based on two conditions, var1=0 and var2=1. > Is there some quicker way to write this in one "if" statement like: > > If ($var1=0 ?and? var2=1) { > Do my stuff > } > > I know I can nest a second if, but just hoped I could do it quicker :) > > Thanks! > jlc um, how about if ($var1 == 0 and $var2) { #do stuff } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/