in reply to exists function used with attributes/operators?
with, for example, this:my $C = exists $opts{'c'} ? '!' : '';
The semantic of the so-called ?: ternary operator (see: http://perldoc.perl.org/perlop.html#Conditional-Operator is essentially the following:my $C; if (exists $opts{'c'}) { $C = '!'; } else { $C = ''; }
$c = condition ? value of $c if condition is true : value of $c otherw +ise;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: exists function used with attributes/operators?
by bArriaM (Novice) on Jul 19, 2015 at 15:32 UTC |