pemungkah,

Thanks for your thoughts. I needed to do a mind transformation to think in terms of references; and, once I did that it was much more clear. My mind tends to think in terms of "static typed variables" if that is a valid way to put it. By that I mean that the variable name "dumm" is always what you initially declare it as.

In addition I don't use Perl very much and remembering all the little syntax variations requires me to thumb through O'Reily's Programming Perl; all 1,000 plus pages. One that always bites me is using ";" in for statements to separate expressions rather than ",".

I agree on the "This is not the world's best clearest code." comment. Before I found this subroutine I was going to write my own. It was written by a mathematics professor at the Institute of Mathematics of the Romanian Academy about seven years ago; it worked and being a follow the path of least resistance kind of person I used it.

With regard to running some test data in a debugger I did that, sort of. However, rather than a debugger I used a number of print statements formatted in a way that put everything on one page of paper so I could pick up a pencil and trace what was happening.

Again thanks for your comments. I know it took some effort to respond in the detail manner you did. I follow and provide help on the "MozillaZine" forum and understand the effort.

Cheers

In reply to Re^2: Total Syntax Confusion Plus by RobertJ
in thread Total Syntax Confusion Plus by RobertJ

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.