in reply to Return array from sub or return empty array
$var = some_class->some_method() || ''Don't do that. It will bite you if some_method returns zero. You can use the double-slash operator instead, if you have a reasonably recent perl installed. But you're probably better off either handling undefs properly, or just turning off warnings.
|
|---|