in reply to Perl interpretor for conditional operator "?"
It's part of the ternary operator construct,
expression ? resultA:resultB
where, if the expression evaluates as true, the operator returns resultA or (where the colon is read as "or") resultB if the original statement is false.
I never have figured out a way to make perldoc -f (any form of the operator or "perldoc -q (any variant)" cough up the explanation, but you can read about it any number of times here (Super Search on "ternary" [sometimes misspelled "trinary"]) or read about it in "Learning Perl" from O'Reilly.
|
|---|