RE: Perl versus UNIX Korn Shell

[email protected] ("Esposito, Anthony") Thu, 6 Nov 2003 10:15:20 -0500
Newsgroups perl.trainers
Message-ID <22A94E05300FCA4B97334B5DFD3EB9D5053DE2CD@ILCHICVEXC006.mail.inthosts.net>
Thanks Danny and everyone else who responded to this question.  
I think I have enough 'ammo' so we can close this thread.
Thanks again.  :-)

Tony Esposito
Oracle Developer, Enterprise Business Intelligence
XO Communications
Plano, TX  75074
Ph: 972-516-5344
Email: [email protected]
 

-----Original Message-----
From: Danny Faught [mailto:[email protected]] 
Sent: Wednesday, November 05, 2003 7:20 PM
To: [email protected]
Subject: Re: Perl versus UNIX Korn Shell

Esposito, Anthony wrote:
> How would you convince someone that programming in Perl is better than

> using the UNIX Korn Shell?
> 
> I need some 'intellectual ammo' to convince my colleagues that Perl is
a 
> better, more powerful language, to do our scripting.  Any suggestions?
J

The shell doesn't do most of the work.  Mostly, you're calling external 
programs, like grep, cat, sort, etc.  These don't all have a consistent 
interface, and they differ from one system to another.  Plus, you'll 
likely end up having to learn sed and/or awk.

Why learn all these different tools, plus perhaps two additional 
languages (sed and awk)?  It's all available in Perl, plus much more, 
including a nice debugger.  And well-written Perl scripts are portable.

BTW, if you insist writing a shell script and need something like awk, 
why not use Perl instead of awk?

There are a few cases where I would favor bash over Perl - when it's 
easier to call several existing utilities than to install additional 
Perl modules (avoid the clutter of those system("...") calls), and when 
I have a very short script that needs to redirect its output to a file.
-- 
Danny R. Faught
Tejas Software Consulting
http://tejasconsulting.com/