It's a good scripting language because of how well regular expressions are
integrated into the language. It's also easy to pick up and use, because
it's pretty lenient in specific syntax.

The lenient syntax can also be seen as a detriment. Depends on how well you intuit the context of the people who develop perl. (I don't quite get a lot of things about perl, but I don't quite get a lot of things about Java, either.)


The syntax and semantics are both generated by people who use it to solve real-world problems, so, in spite of the fact that it can be a bit hard to intuit at times, you usually discover that there are good reasons behind the ways they do things.

Oh, and There's always More Than One Way To Do It. (That blade cuts both ways, too, of course.)

I can't recommend a book though, as
most of what I know of perl has been from reading other peoples scripts and
asking some of my programmer friends "how would I accomplish X?"

Reading examples is very much recommended. Also, ...

On 5/14/05, Eugene Hercun <[EMAIL PROTECTED]> 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.

In addition to the above, it is part of the system install on essentially all the popular unix-like OSses, and is available as a port for pretty much all the rest of the unix-like OSses. (I don't recall reading whether plan9 has a port for it.) And it is available as a port for some non-unix-like OSses, as well, including MSWxxx. (I don't much care for ActiveState's attitude, but they have a dead-easy install.)


On the down side, the methods of distributing modules leave me a little disconcerted at times.

If you find yourself wanting to add modules to the system install, or wanting to upgrade the system install, I recommend installing a separate interpreter. Using the separate interpreter lets you keep the system install of perl stable and clean (important when many OSses have utilities written in perl).

What are some good books for beginner through advanced scripting? I
poked around amazon.com <http://amazon.com> and the user reviews are
generally useless.

Try http://www.oreilly.com/

The books I recommend for starting out with perl are the the canon: llama (Learning Perl), the camel (Programming Perl), and The Perl Cookbook. The style can be a little odd at times, but the jokes are in some cases essential.

Perl in a Nutshell may help to put things together, but it is not a substitute, and you might to check whether they have a new one out to bring it up to date with 5.8.x. Instead, I recommend perldoc, which is part of the distribution, and is often integrated with man. (Type "perldoc perldoc", or "man perldoc" at the command line. And don't forget "perldoc perlpod".)

Unfortunately, the best hardcopy books are a little behind the leading edge of perl, but you don't want to start out on parrot and perl 6, anyway.

Oh, and there are lots of mailing lists for perl at

http://www.perl.org/community.html

--
Joel Rees
Complaining about systems that are incomplete misses the point.
In this world, a system can't be perfect and useful at the same time.
Of course, there's no excuse for refusing to fix problems --
we'll never run out of problems.




Reply via email to