[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Shell script or Perl?



-- Chun Kit Edwin Lau <try_email_me@yahoo.ca> wrote
(on Thursday, 12 June 2003, 09:48 AM -0400):
> 	In what situation does ppl normally use shell script and when
> when will ppl use Perl?  How about their performance like speed and also
> the ease of programming?

Use what you're comfortable with, and use the tool that fills your need
best.

For instance, I'm comfortable with perl. One aspect of it I particularly
like is that it is also very portable: I don't have to worry about which
shell is available on which system; I can use the same language to
create a quick shell script, a GUI application (using GTK or TK), or a
web interface. However, it also means that if I'm performing system
calls of any kind, I have the additional overhead of opening a shell.

Shell programming is very nice for quick scripts that string together
commands or add logic to commands. As such, the only overhead is the
shell you already use. However, it may not be as portable.

Some will swear by python, ruby, or even PHP (which, when compiled as a
CGI, can be run as a scripting language from the command line). Find the
language that suits your needs.

-- 
Matthew Weier O'Phinney
matthew@weierophinney.net
http://matthew.weierophinney.net



Reply to: