At 07:41 PM 9/3/2002 +0100, Sandy Fleming wrote:
>What I actually needed to do was demonstrate to colleagues why we would be >better off scripting in Perl rather than DCL. So the aim was to convert one >of our DCL command procedures into Perl and show how very much simpler it >becomes. > >As it happened, the command procedure chosen for the task sets the user's >default to a new directory permanently, so I had to be able to do just that! As Peter has reminded me, VMS::Stdio::setdef() will do that for you and VMS::Stdio is included in the Perl distribution. For serious DCL replacement you may also want some of the extensions available on CPAN but not included with Perl. VMS::Device, VMS::Process, VMS::System, and VMS::IndexedFile come to mind immediately in no particular order, and of course there are others. Where Perl can really slaughter DCL is not surprisingly in text processing. If you have procedures that make heavy use of F$ELEMENT, F$LOCATE, or do text substitutions and such then hundreds of lines of DCL can sometimes be reduced to a handful of lines of Perl (sometimes even one line).
