But did you miss that part of the OP? Or just ignore it but not want to bring up the same old discussion that comes up whenever anybody claims they "aren't allowed to use modules"? Or other?

I didn't miss it.

I (rightly or wrongly) assumed that the OP wasn't interested in installing any new modules in order to effect the transformation. Eg. one of the many Set::* or Matrix::* modules that probably exist. In other words, I didn't view the OPs question as a "Can you do this without the use of any modules whatsoever?" challenge.

I didn't think about the why of the restriction for two reasons.

  • Often as not, those type of modules are OO-style; impose their own intermediate storage format on the data; often have a not insignificant learning curve.

    To me, this is like buying one of those 1000 piece toolkits in order to get a hammer to crack a nut. If the application requires extensive use of matrix manipulations, then installing and using one of those modules makes sense, but for the OPs task, overkill.

  • I've worked at many sites where the in-house rules seemed stupid to me, but I had to comply with them regardless of my opinions.

    The OP knows their situation best and Yet Another Extended Discussions on the merits or otherwise of "Approved modules only" policies seemed to have no merit to me.


    With respect to D::D:SLC.

    If I thought that there would be sufficient demand for a Dumper only module, then I might go through the process of producing documentation (fairly easy as it has only three parameters, but even that would require me to write POD which I find an exercise in total frustration), and packaging it for CPAN.

    But previous threads here at the Monastery with respect to this subject suggested to me that the demand does not exist. Indeed, just my asking if such a module did exist, drew so much ire that I thought is best not to mention it again.

    I also don't think it's mature enough yet. I still encounter occasional bugs--though not for a while--and I am of the opinion that modules become candidates for CPAN when they have prooved themselves useful and stable for their authors. Not because someone decided that they needed to have a presence on CPAN.

    Not a universally accepted opinion I know, so I don't usually express it, but I try to live by what I think.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

    In reply to Re^5: Transpose a matrix of chars by BrowserUk
    in thread Transpose a matrix of chars by dirac

    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.