Note: my english is not as good as it might look like, so if anything I write here might have more than one meaning and one of those could be taken offensive I just mean the other one, which does not :-)

I'd go always with KISS, as thats the perlish way.
I mean a lot of Perls magic comes from the fact that "what you give is what you'll be returned".
So the reason to go for KISS is simply to keep it common, eg. I should have the same expectations to your modules that I have to core modules.
Many functions act different on how they are called, but they do it consequently, so I'd suggest: if caller passes a ref so return a ref, if caller expects a string (scalar context) return the length of the array that would have been returned if the function would have been called expecting an array (list context) to be returned.
If called with an arraref return the ref to the resulting array.
At least in this way also 'baby perl' coders will be able to use your module.

Have a nice day
All decision is left to your taste

In reply to Re: KISS vs Feature set by little
in thread KISS vs Feature set by Masem

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.