- or download this
$c = &func();
$c ? say "$c found!" : say "None!";
- or download this
$c = (&func() ? say "$c found!" : say "None!");
- or download this
perl -Mstrict -E 'sub func {5}; my $c; my $results = ( $c=func() ? 1 :
+ 2); say $c, "\t", $results'
- or download this
perl -Mstrict -E 'sub func {5}; my $c; my $results = ( $c=func()) ? 1
+: 2; say $c, "\t", $results'