The code snippet is the original translation of the AWK script.

That probably explains where this line came from:

$[ = 1; # set array base to 1
If you have a lot of other stuff to add to your perl script, you almost certainly want to make sure to DELETE THAT LINE.

(If you have already written the additional code, and have made all the adjustments needed to accommodate the non-standard value for $[, that's unfortunate. Still, you should consider deleting that line anyway, and adjusting everything back to "normal".)

I had never seen or used "a2p" before (I never did a lot of awk scripting). Now that I've seen what it does If the OP code is really an example of what it does, I think I'll avoid it.


In reply to Re^3: Multidimensional Hash implementation/usage by graff
in thread Multidimensional Hash implementation/usage by subhankar

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.