http://qs1969.pair.com?node_id=1212871


in reply to Compound statements within the conditional (ternary) operator

Mostly what AnomalousMonk said. The first paragraph on ?: in Programming Perl (4th ed) talks about it being an operator and expression similar to if-then-else which is a flow control statement. A hopefully simpler example:

use Modern::Perl; my $count = 0; print defined $count ? do { my $s = ''; $s .= '=' until $count++ == 10; $s } : "Undefined count.\n";
Ron