RR> What's PERL?
RR>
It's a new language that has been getting very popular lately.
It is essentially a script language, like the Unix shell scripts.
However, PERL is much faster since the entire script is compiled
when you run it, existing as a tight and highly optimized executable
in memory (not on disk). It provides all the features of awk, sed,
grep, sh, csh, and many of the features of C.
Its very easy to work with, and is well suited to many kinds of
programming, especially quick hacks, data extraction, system
administration tasks, etc. Some of its more powerful features
include references (there are NO pointers), objects (PERL 5 is
object oriented, with C++ method calling syntax, and the ability
to do run-time loading of methods and such), associative arrays (aka
hash tables), etc. It also has calls for sockets, fork, and a bunch
of really powerful functions.
For example, suppose you have read line from a database file, and
it looks like :
My Name:Some Address:My Telephone:Comments
If the line was stored in $Line, you can break it into separate
variables with :
($Name,$Addr,$Tel,$Comm) = split(/:/,$Line);
You could also make an array out of it.
@Record = split(/:/,$Line);
where the fields would be $Record[0], $Record[1], etc.
Its a really great language. And its FREE. Just get the source and
compile it. It comes with lots of docs, and there are two books written
on it (I've even seen training classes for it).
Suppose you want to write a signal handler to catch SIGINT .. you use:
sub myhandler {
local ($signal) = @_;
# some stuff
}
$SIG{'INT'} = 'myhandler';
This defines a subroutine, myhandler. All parameters are passed
in an array called @_. The 'local' function localizes a variable
so that its value is restored when the block ends. You trap the
signal by just assigning the name of the subroutine to call to the
element of the %SIG associate array.
Anyway .. I want to use the object and socket features of PERL
to write a GEM library. I think you could do some neat things
with a PERL GEM.
--- Maximus/2 3.00
[+/134 of 200/107 Mins] = * FIDO: ST_PROG =: Next...
* Origin: Wylie Connection 33.6K USR V34+ DS 214-442-0388 (1:124/7028)
|