What is the basic difference u find between a shell script and perl.I mean the advantages of one over the other.

Showing Answers 1 - 6 of 6 Answers

Sachin.K.P

  • Jun 7th, 2007
 

My ideas on the main differences are:


- Perl is complied at run time and runs faster as a result. Shell scripts are
translated line by line. This is much slower for many uses.
- Perl handles floating point, and math stuff in general much more readily.
- Perl has a lot of built in stuff to handle arrays more easily, and modules in
general are what Perl is about.
- Perl is platform neutral, so most scripts should be slam dunks to move to
another platform, or run on multiple platforms.
- Shell script for many tasks are probably faster to develop, though.


These are just some of my ideas. Other people probably have more.


Cheers,
Sachin.K.P

  Was this answer useful?  Yes

wow_suraj

  • Jun 17th, 2009
 

I believe, most important difference will be platform dependency.

1) PERL scripts can be used on both UNIX and windows systems, unless some OS specific commands are used. But the same case is not with Shell scripting.

2) PERL scripts are used for web based applications but shell scripts can not be used for the same purpose.

3) PERL modules gives PERL extra edge over Shell scripts. PERL modules are extensive and can be used for n number of purposes. 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions