Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
While it depends greatly on the task at hand, some reasons I have not used ksh or bash for development are (in no particular order):
  1. If you have a situation requiring lots of operations where the shell would fork a simple program (e.g. date, rm, ln) and where perl would do it directly, the fork overhead may be very high.
  2. Perl code can be easier to maintain. Some shell-only programmers may disagree, but I tend to forget why I did certian "tricks" in shell scripts. But I can generally figure out my old perl scripts.
  3. Perl has better support for functions.
  4. CPAN
  5. Perl expressions are generally easier to follow than calls to expr/sed/grep.
  6. It is probably easier to find new good Perl programmers to add to a team than to find new good ksh programmers.
I am in the process of converting most of my non-trivial shell scripts to perl. I recently tried to explain two large scripts, one perl one shell, to a group of inexperienced programmers. They could follow the perl, but not the shell, and the shell was much simpler code, honestly. The issue in that case was that the shell required verboseness and tricks that were not necessary in perl.

HTH, --traveler

In reply to Re: Comparison between Perl and Ksh by traveler
in thread Comparison between Perl and Ksh by bizzach

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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others scrutinizing the Monastery: (6)
    As of 2021-01-17 21:32 GMT
    Find Nodes?
      Voting Booth?