On May 14, 2005, at 4:24 PM, Eugene Hercun wrote:
Hello everyone,
I was reading the "UNIX System Administration Handbook" the other day, and I really liked the idea of programming your own scheduled automated tasks. Mr. Holland made a very good point regarding this issue "Ok, your computer is doing some "inefficient work", but that's what computers are good for -- working. Save the thinking for people." - Mr. Nick Holland
Anyway, I was curious, the "UNIX System" book mentioned that Perl is a good programming language to use for scripting, but it does not explain why.
Perl is incredibly good at mangling text. Because much of shell scripting is input/output (pipes) manipulation, you might as well use a language that has all of that plus excellent built-in regex. Considering that other languages now include PCRE (Perl Compatible Regular Expressions), it should tell you something about the ubiquity of Perl. Beyond that, it has all the socket-level stuff you'd probably ever need, and even has good OO support. Oh, and of course there's this little thing called CPAN. ;-)
I love this comparison of Perl Vs. PHP. Although not directly applicable to your question, it does give a number of reasons (from a developer's POV) why Perl doesn't suck.
http://tnx.nl/php
What are some good books for beginner through advanced scripting? I poked around amazon.com and the user reviews are generally useless.
For Perl programming, the O'Reilly Perl books rock. Start off with Learning Perl, advance in to Learning Perl Objects, References, and Modules, then perhaps graduate to Programming Perl. It would also help you to get acquainted with Perl Monks (http://www.perlmonks.org). There are plenty of great Perl hackers that are willing to help out with your posted questions or just hanging out in the chatterbox.
HTH.
-- Jason Dixon DixonGroup Consulting http://www.dixongroup.net