Personally I don't see any evident maintainability advantage that initialization-by-pushes buys me over the "standard" one that any decent text editor couldn't give me just as easily. The only "problem", if you really, really want to call it a problem, may have to do with the first and last entry. If you're really, really that concerned about the few extra keystrokes these may involve, then you how 'bout

my @folk = ( "Hibbs", "Daglish", "Schwartz", "Vroom", );

instead?

Now you're going to show me something that uses "qw", aren't you? OK, go ahead, but don't forget to show me how it looks when an entry contains spaces.

What's the problem? If I have a set of "words" (in the qw// acceptation!) then I use qw//. If I have a set of "strings" some of which contain spaces or may cointain spaces in a future re-editing of the code, then I don't. Period!

Oh, and in the unlikely case I implemented a list with qw// and later it turned out that some entries must contain spaces, I have quite a few workarounds none of which is likely to cause any major nor minor damage to my hands, sight, brain, etc.


In reply to Re: Build your array with push by blazar
in thread Build your array with push by PhilHibbs

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.