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

       Ternary "?:" is the conditional operator, just as in C.
       It works much like an if-then-else.  If the argument
       before the ? is true, the argument before the : is
       returned, otherwise the argument after the : is returned.



John
-- 
use Perl;
program
fulfillment

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

Reply via email to