$a = $b eq "" ? 1 : 0;

2001-10-30 Thread Etienne Marcotte
$allowed = $username eq 'admin' ? 1 : 0; Can someone explain me this line? I don't get the ? 1 : 0 part They say it need to be used instead of $allowed = 1 if $username eq 'admin'; for a mod_perl env. Etienne -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

RE: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread RArul
If the username is equal to admin, $allowed is assigned 1 or else it is assigned a value of 0. Rex -Original Message- From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 9:56 AM To: [EMAIL PROTECTED] Subject: $a = $b eq "" ? 1 : 0; $allowed = $u

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Etienne Marcotte
assigned a value of 0. > > Rex > > -Original Message- > From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 30, 2001 9:56 AM > To: [EMAIL PROTECTED] > Subject: $a = $b eq "" ? 1 : 0; > > $allowed = $username eq 'admin' ?

RE: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 30, 2001 9:56 AM > To: [EMAIL PROTECTED] > Subject: $a = $b eq "" ? 1 : 0; > > > $allowed = $username eq 'admin' ? 1 : 0; > > Can someone

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Me
> > $allowed = $username eq 'admin' ? 1 : 0; > > > > $allowed = 1 if $username eq 'admin'; > > FWIW, that statement by itself has no relationship to mod_perl. Well, I think the point is that mod_perl doesn't reset the value of variables between runs so the second line may not do what the progra

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Jeff 'japhy' Pinyan
On Oct 30, Me said: >> > $allowed = $username eq 'admin' ? 1 : 0; >> > >> > $allowed = 1 if $username eq 'admin'; >> >> FWIW, that statement by itself has no relationship to mod_perl. > >Well, I think the point is that mod_perl doesn't reset the value >of variables between runs so the second li

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Etienne Marcotte
using $allowed = ($username eq 'admin'); how do I check for allowed? with 1 :0 I can do if ($allowed), do I need to do if ($allowed eq "true")? If yes it's a little longer to write:-) Etienne Jeff 'japhy' Pinyan wrote: > On Oct 30, Me said: > > >> > $allowed = $username eq 'admin' ? 1 : 0; > >>

Re: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Jeff 'japhy' Pinyan
On Oct 30, Etienne Marcotte said: >using $allowed = ($username eq 'admin'); >how do I check for allowed? with 1 :0 I can do if ($allowed), do I need to do >if ($allowed eq "true")? If yes it's a little longer to write:-) Did you bother looking at what eq returns? It returns 1 or '', which means

RE: $a = $b eq "" ? 1 : 0;

2001-10-30 Thread Bob Showalter
> -Original Message- > From: Me [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 30, 2001 1:05 PM > To: Bob Showalter; 'Etienne Marcotte'; [EMAIL PROTECTED] > Subject: Re: $a = $b eq "" ? 1 : 0; > > > > > $allowed = $username eq '