in reply to Re^4: Short form (ternary) if else
in thread Short form (ternary) if else

If you want to see how Perl sees and parses your code (and in particular, via the  -p "extra parens, please" switch, how it interprets precedence), use the O and Deparse modules:

>perl -wMstrict -MO=Deparse,-p -le "my ($node, $disk, %vxdgs) = (0, 0); my $vxdg; (exists $vxdgs{$node}{$disk}) ? $vxdg = $vxdgs{$node}{$disk} : $vxdg = ''; " BEGIN { $^W = 1; } BEGIN { $/ = "\n"; $\ = "\n"; } use strict 'refs'; (my($node, $disk, %vxdgs) = (0, 0)); my($vxdg); ((exists($vxdgs{$node}{$disk}) ? ($vxdg = $vxdgs{$node}{$disk}) : $vxd +g) = ''); -e syntax OK