if (length $food) ... # instead of if ($food) ...