in reply to return ref is better ?

There is no best solution, and having to always think about it complicates virtually every API.

In general if you get into the whole map, grep, etc frame of mind then returning lists is better than refs. Returning refs is marginally more efficient and better fits how some other people work. That also allows you to keep your style more similar as you move between Perl and other languages. The whole wantarray and return a ref or a single element seems like a good idea, but my experience with it has not been very good.

So any choice you make can be defended.