I think Perl loses a lot of its advantage when you a start writing large chunks of code with it.

From my experience, length has nothing to do with things, for the most part -- any large chunk of code is just an assemblage of small chunks of code. Of course, because you can do so much with so little, some people may try to use techniques that they would use for throw away scripts for larger programs.

Larger programs take a different mindset on the programmer's part -- making sure that you choose effective variable, subroutine and package names; adequate comments and documentation; etc. I don't think the language plays as much as a factor as the programmer in these sorts of situations.

From my experience, the main issues that I have with Perl are when assumptions are made, that you may need to supress -- like autovivication, or that a scalar can hold a number, string or reference, or that the first argument to print may be a filehandle.indirect object syntax with print

I've never found that I couldn't work around any of the problems that I've had, but there are times when you're writing something, and things don't behave as you expected (this tends to happen more with non-core modules -- I've lost way too much time redoing large chunks of the serializer in SOAP::Lite so that it behaves how I prefer it to work.)

In times like this, I have yet to find that I couldn't work around the issues, but it can be a time suck, as you sift through documentation, websites, the code, etc. -- this is the time when I find I lose any advantages.

A few times, I've had to change my logic to more closely mesh with the modules that I'm using, or otherwise rewrite large chunks of it, but I've never had to give up and move to a completely different language. (well, for some web-based stuff, I'll use JavaScript, too, or use PL/SQL for Oracle stored procedures, but that's been because of how I thought about the problem, not because I tried to do it in Perl, and failed).

Update: I realized I probably shouldn't have singled out SOAP::Lite in the above example, as the reason I had to rework the serializer was to get it to work with a Java toolkit... so in a way, it was actually Java's fault that the Perl wasn't working.

Update: revdiablo reminded me that technically, print doesn't take a filehandle as an arg -- it's a different calling syntax. So I'll complain about indirect object syntax in general.

In reply to Re^2: TMTOWTDI... and most of them are wrong by jhourcle
in thread TMTOWTDI... and most of them are wrong by tlm

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, 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, 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.