in reply to Re^2: Code blocks with ternary operator or trailing conditionals
in thread Code blocks with ternary operator or trailing conditionals

Use parentheses for those list-eating functions.
push(@results, $item), next if defined $item;