short-spoken yes. As for "best", I'm not sure about that.

These variables at index 5 and 6 have some sort of application meaning. I would use that application meaning to explicitly name these two variables. And use those names in the print statement rather than using a simple join of an array based upon indicies.

Creating a scalar value is "cheap" (in terms of processing power) - it usually won't make any significant difference in execution time.

Choosing good variable names plays a key role in documentation.

One year from now, you may forget what field 5 vs 6 meant. I have no idea what is appropriate here: $starting_balance or $ending_balance or whatever. But give them names so that it will make sense one or two years from now. Oh, another point: If others cannot understand it, you will not "be able to get rid of it". Meaning have the support person cannot take over this thing instead of you!

Good code is understandable and maintainable.


In reply to Re^4: problem in splitting the line by Marshall
in thread problem in splitting the line by devi

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.