EL> PERL fills a gap between the shell script and the C application - its
RR>
RR> I am almost tempted to say that is what interpreted Basic was for! At
RR> one time, anyway. :-)
All your points were valid, but PERL is different from basic in a number
of ways. I won't get into line numbers and the 'OLD BASIC' languages,
but if you compare to the new basic languages, you'll find PERL goes
above and beyond.
1 - runs like a script language - you run the script directly, it is
automatically compiled to memory and executed at compiled speed.
With basic, you either compile it yourself, and keep separate
binary and sources, or first load the interpretter which will
interpret line-by-line (slow).
2 - sockets, networking, case-sensitive (OK, some people might not
like that, but I hate a language where EVERYTHING is in upper-case)
regular expression matching, hash-tables, unix functions (fork,
exec, system, chmod, unlink, opendir/readdir/closedir), and
syntax similar to anyone that uses C, sed, awk, sh, csh, or
anything else on unix.
3 - Perl 5 has references (like pointers, only they can never point
to no-where - they always point to something valid in the code),
and objects. Package scoping, dynamic loading, lots of modular
coding stuff from Perl4 has been expanded in Perl5. And a new
way to do local variables (explicitly makes the local a reference
to the passed parameter, instead of using the $_[0], $_[1] or
making copies of the params in a global by pushing the global
on the stack - the new way makes a real local scope variable
that is a reference to passed param - or a reference to whatever
is on the stack (a real auto).
4 - Its FREE. And standardized. There is no more standard BASIC
anymore. I also find it much faster to whip up a PERL script
than do anything in BASIC. You might find PERL to be the
hackers langauge of the 90s. PERL5 also has APIs callable
from C, its fully embeddable, has a nice debugger, and you
can do neat things like keep the manual page in the same
file with the PERL code - you execute the file and it runs
code - read it with man, and you see only the nicely formatted
manual page. Keeps docs together with code!
I'm still trying to get PERL 5 to compile properly for MiNT. I have
it running under SCO (yuck! I hate SCO) at work, and I have PERL 4
for MiNT (actually for TOS, it doesn't have alot of MiNT stuff).
There are WinNT and Win32 versions of PERL, DOS versions (using a 32
bit 'DOS extender' - and I have the DOS version) an OS/2 version (I think),
as well a version for every other platform. Its a nice universal
language. I use it EVERY day now - from quick 1 liners on the command
line (no source file) to editing multiple file documents with a full
curses based interface with plenty of 1-file quick-scripts, such
as the one that does our nightly backup.
I would say that PERL 5 can tackle any problem better than C++, and
is MORE flexible than SmallTalk or Objective C (certainly more flexible
than C++ or Ada). PERL 5 doesnt have alot of typing security - in fact,
it doesn't have any at all :-) But I like it that way. Considering
the amount of national support its been getting (professional perl
training seminars and use in-house by IBM and other top companies),
I think PERL may be the 'BASIC' of the 90s.
--- Maximus/2 3.00
[+/169 of 200/107 Mins] = * FIDO: ST_PROG =: Next...
* Origin: Wylie Connection 33.6K USR V34+ DS 214-442-0388 (1:124/7028)
|