Well, it's probably closer to:
but that's less readable to the uninitiated than what you have. :-Pmy $count = do { if ($row[0]) { $row[0]; } else { 0 } };
In reply to Re^2: Help understanding a single line of perl: my $count = $row[0] ? $row[0] : 0;
by Tanktalus
in thread Help understanding a single line of perl: my $count = $row[0] ? $row[0] : 0;
by kdmurphy001
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |