[aprssig] Programming Language Advice
Curt, WE7U
archer at eskimo.com
Thu Jan 15 10:24:35 EST 2009
On Thu, 15 Jan 2009, Ray Wells wrote:
> The question is, what should I be using, perl or awk? Armed with the
> answer I can devote my time in that direction.
Choosy Xastir programmers choose Perl...
I've done sed/awk/Perl/C, and others. C sucks for string handling
as there are a lot of details you need to take care of.
Perl has sed and awk-type of things built-in, so with the one
language you can do regular expression editing of strings quite
easily. You'll find a lot more Perl people these days than sed or
awk.
As far as Scott's comment about readability, you can make Perl as
readable as anything else, it's just a language. Some Perl
programmers used to think it was cool to make terse scripts, but the
readability suffers and they become much less maintainable.
One of the weirdnesses of Perl is that a default variable gets used
if none is specified. If you don't know that particular fact it's
hard to read a lot of Perl code 'cuz you don't know what's being
worked on. Other than that it's a lot like C or Pascal or Java.
You can also do object-oriented programming in Perl, or
mix-and-match some of that with structured programming.
For Perl books these are the ones I use:
Learning Perl
Programming Perl
Perl Cookbook
The "Perl Cookbook" is the most useful overall. It has working
examples of many of the types of things you might want to do, so
you can borrow code bits from it.
For getting started learning the language "Learning Perl" works,
although I don't use it that much anymore. I use "Programming Perl"
mostly as a reference but really have to have it on the bookshelf
'cuz I do refer to it.
"Mastering Regular Expressions" is another good one to have on the
bookshelf. I don't refer to it often, but when I need more advanced
stuff I _really_ need that book.
--
Curt, WE7U. archer at eskimo dot com
http://www.eskimo.com/~archer
Lotto: A tax on people who are bad at math. - unknown
Windows: Microsoft's tax on computer illiterates. - WE7U.
The world DOES revolve around me: I picked the coordinate system!"
More information about the aprssig
mailing list