PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Lisa, Thomas P [IT]" <thomas dot p dot lisa at ssmb dot com>
Subject: RE: Sybperl Vs Shell Scripts
Date: Mar 28 2002 3:57PM

I'd like to add -

1. perl scripts can be made into an executable which reduces the amount of
perl-related
    software that needs to be added to a machine.

2. perl is portable across different OS's and hardware.

3. sybperl is portable across different DBMS's.

And just to round out the discussion based on the real world. The reasons
for using
shell scripts are:

1. You don't have to install perl on the machines where the scripts run.

2. perl is a more sophisticated language. If your developers are struggling
with shell scripts,
    going to perl isn't going to make them any better.

3. perl requires a higher level of support to install, configure and upgrade
the software.
    shell comes with the OS and requires no support to install.

4. I would imagine everybody on a Unix box knows shell, but not everybody
perl.

Our maintenance jobs on several hundred Unix boxes use bourne shell scripts.
All the
drawbacks listed below are definitely a problem. It is harder to develop and
support shell, but
once you get into a design and coding philosophy it's not bad, albeit not
nearly as powerful as
sybperl. Like anything else, if you're serious about supporting the scripts
you can still design
and code them to be robust.

Tom



-----Original Message-----
From: Michael Peppler [mailto:mpeppler@peppler.org]
Sent: Thursday, March 28, 2002 10:03 AM
To: SybPerl Discussion List
Subject: Re: Sybperl Vs Shell Scripts


Sabherwal, Balvinder (MBS) writes:
 > I am looking for some inputs from you in order to present some facts
about
 > the capabilities of sybperl which are lacking in shell scripts and also I
 > need to make a compelling argument to use perl instead of shell scripts.
 > 
 > Can anyone help me get this info or point me to some place where I cam
find
 > some info so I can get some information. The questions I am looking to
get
 > answered are :
 > 
 > Why should we use perl instead of shell scripts??
 > What features perl/sybperl offers that are not in shell scripts?
 > How is perl beneficial as compared to shell scripts??

perl scripts are much faster than shell scripts.
perl scripts allow much better error control and recovery.
sybperl (vs. isql in shell script) is *much* faster, *much* better
error control, greatly expanded usage flexibility.

perl scripts are checked for syntax errors before they are run, so you
won't get a script that aborts half-way through because of an error on
line 256 (or wherever).

perl scripts can use eval {} to catch fatal errors in deeply nested
code and cleanly restart/retry/abort in case of errors.

CPAN - The Comprehensive Perl Archive Network - has modules for just
about any task imaginable. These modules have (in general) been tested
by lots of other folks, so you won't have to reinvent the wheel each
time you have a new project.

The perl user community is extensive, with a lot of resources to draw
from if you run into a problem - for example www.perlmonks.org, where
I hang out from time to time.

sybperl is well supported (by yours truly :-) and has been around for
over 10 years now...

Michael
-- 
Michael Peppler                              Data Migrations, Inc.
mpeppler@peppler.org           *or*          mpeppler@mbay.net
http://www.mbay.net/~mpeppler
International Sybase User Group: http://www.isug.com