in reply to Help understanding a single line of perl: my $count = $row[0] ? $row[0] : 0;
The structure goes: (condition) ? (ifTrue) : (ifFalse);
So that code will set count to $row[0] if $row[0] is true, and if not, set it to 0.