home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / shell / 5143 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  2.2 KB

  1. Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
  2. From: davidsen@ariel.crd.GE.COM (william E Davidsen)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: ksh 1, perl 2 - ksh or perl for scripting?
  5. Message-ID: <1992Dec23.160443.13103@crd.ge.com>
  6. Date: 23 Dec 92 16:04:43 GMT
  7. References: <ASH.92Dec21095237@ulysses.mr.ams.com>
  8. Sender: usenet@crd.ge.com (Required for NNTP)
  9. Reply-To: davidsen@crd.ge.com (bill davidsen)
  10. Organization: GE Corporate R&D Center, Schenectady NY
  11. Lines: 32
  12. Nntp-Posting-Host: ariel.crd.ge.com
  13.  
  14. In article <ASH.92Dec21095237@ulysses.mr.ams.com>, ash@ulysses.mr.ams.com (Alan Harder) writes:
  15. | Hi, all.  We are currently trying to decide if we should move from
  16. | /bin/sh as our language for production scripting to ksh, or if we
  17. | should move to perl instead.  Is anyone out there using perl as their
  18. | production scripting language of choice? 
  19.  
  20.   You should definitely move!
  21.  
  22.   Now, as to where, I prefer ksh for most problems, although there are a
  23. number of things which work more easily in perl. I find that ksh does
  24. redirection and argument truncation in a way which is easier to enter
  25. and read (for me) than perl. Things like ${name%.*} are trivial to write
  26. in ksh, but somewhat more verbose in perl. For these reasons I find I
  27. use perl very sparingly, possibly only a few times a month.
  28.  
  29.   Certainly the retraining will be faster if you go to ksh, since you
  30. can use 100% of the things you already know, and can use the same shell
  31. for programming and interractive use, which speeds learning.
  32.  
  33.   Perl is more powerful, but seems to provide too many solutions for my
  34. taste, certainly for simple problems. I like a language where there is
  35. one clear way to solve a problem rather than one which has many ways,
  36. since I find that programmers tend to waste a lot of time looking for
  37. the single elegant way to solve the problem, rather than finding one way
  38. which is clearly best and then useing it. This is particularly true of
  39. really clever perl programmers I have known, who seem to feel the need
  40. to write "impressive" code instead of code which just works.
  41.  
  42. -- 
  43. bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
  44.     Keyboard controller has been disabled, press F1 to continue.
  45.