Re: What is this called: ($myvar-{otherid}) ? 'stringA' : 'stringB';

2003-11-22 Thread R. Joseph Newton
Jeff Kowalczyk wrote: I'm not yet able to read certain parts of perl code. What is this comparison/alternation after the hash lookup on 'otherid' called, and what does the code do? $myvar-{id} = ($myvar-{otherid}) ? 'stringA' : 'stringB'; Thanks. That is the conditional operator. Joseph

What is this called: ($myvar-{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread Jeff Kowalczyk
I'm not yet able to read certain parts of perl code. What is this comparison/alternation after the hash lookup on 'otherid' called, and what does the code do? $myvar-{id} = ($myvar-{otherid}) ? 'stringA' : 'stringB'; Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: What is this called: ($myvar-{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread Morbus Iff
I'm not yet able to read certain parts of perl code. What is this comparison/alternation after the hash lookup on 'otherid' called, and what does the code do? $myvar-{id} = ($myvar-{otherid}) ? 'stringA' : 'stringB'; It's a ternary or flip-flop statement. In this case, the above is the

Re: What is this called: ($myvar-{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread Kevin Old
On Thu, 2003-11-20 at 15:18, Jeff Kowalczyk wrote: I'm not yet able to read certain parts of perl code. What is this comparison/alternation after the hash lookup on 'otherid' called, and what does the code do? $myvar-{id} = ($myvar-{otherid}) ? 'stringA' : 'stringB'; Thanks. Jeff, This

Re: What is this called: ($myvar-{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread drieux
On Thursday, Nov 20, 2003, at 12:18 US/Pacific, Jeff Kowalczyk wrote: I'm not yet able to read certain parts of perl code. What is this comparison/alternation after the hash lookup on 'otherid' called, and what does the code do? $myvar-{id} = ($myvar-{otherid}) ? 'stringA' : 'stringB'; it is

Re: What is this called: ($myvar-{otherid}) ? 'stringA' : 'stringB';

2003-11-20 Thread John W. Krahn
Jeff Kowalczyk wrote: I'm not yet able to read certain parts of perl code. What is this comparison/alternation after the hash lookup on 'otherid' called, and what does the code do? $myvar-{id} = ($myvar-{otherid}) ? 'stringA' : 'stringB'; perldoc perlop [snip] Conditional Operator