Some general info on VMS Perl

(This page is currently under construction--much more so than most web pages)

What is Perl?

Perl is a general-purpose programming language originally developed to do what several other Unix languages or utility programs do (AWK, sed, C, and several shells, amongst others), only easier and in one place. It's since grown far beyond that. Pretty much anything you can do in C or DCL can be done directly in Perl, and easy mechanisms are in place to add C code or call DCL for anything that can't. For lots more detail, check out the perl docs, or the pages at Perl.Com.

What sorts of things can Perl do?

Perl is a programming language, and as such can do pretty much anything you can do in another language, such as C or COBOL. Perl excels in text processing , and has many features designed specifically for parsing and changing character strings. For more detail and evangelism, head over to www.perl.com.

Why should I care about Perl on VMS?

That's a very good question. Perl is used on most Unix boxes as a replacement for writing shell scripts, and VMS has a perfectly good scripting language, DCL, built right in. Right? Well, there are just a few good reasons.

  1. Perl is faster than DCL for non-trivial scripts
    DCL parses and reparses your .COM files as it runs through it, while Perl reads it once, parses and tokenizes it, and executes the 'compiled' code. This can have significant time savings with larger command procedures.
  2. Perl is cross-platform
    With only a few nods towards cross-platform compatibility, your scripts can run unchanged on VMS, most flavors of Unix, OS/2, WinNT, Win95, and Plan9, as well as on Macs and Amigas.
  3. Perl has better script error checking
    Since Perl parses your entire script when the script gets read in, syntax errors in little-used parts of your script get picked up immediately. There's nothing quite like having a $IF $STATUS.NE.%X00000001 THEN GOOT NOTIFY_OPERATOR in your backup command procedure to really ruin your day when something fails. With Perl, that misspelled goto would be caught the first time you ran the script.
  4. Perl can do more than DCL
    Lots more, actually. Amongst other things, Perl has an amazingly strong set of list and string operators, regular expressions, and direct access to TCP/IP sockets. And, while you can always write programs to do that and access them with DCL, you don't have to with Perl, saving on image activation time, amongst other things.


Last Update 06-September-1997
Questions or Comments?
Write the Webmaster