$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.
In reply to Re: Return array from sub or return empty array
by Anonymous Monk
in thread Return array from sub or return empty array
by gregzartman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |