1827833 Members
1847 Online
109969 Solutions
New Discussion

Re: Perl on VMS

 
SOLVED
Go to solution
Robert Atkinson
Respected Contributor

Perl on VMS

I am just starting to learn Perl using 'Perl For Dummies', but this assumes a Unix environment quite a bit.

Does anyone have any helpful tips on using Perl on VMS (Apache), particularly the command differences for functions?

Are there any good VMS Perl references on the Web that I should look at?

Thanks in advance, Rob.
10 REPLIES 10
Craig A Berry
Honored Contributor

Re: Perl on VMS

Start with

$ perldoc perlvms

or go to

http://www.perldoc.com/perl5.8.0/pod/perlvms.html

Check out the (slightly out of date) page at:

http://www.sidhe.org/vmsperl

Send mail to vmsperl-subscribe@perl.org to join the vmsperl mailing list, and/or check out the list archives at:

http://www.xray.mpe.mpg.de/mailing-lists/vmsperl/

But depending on what you're doing there may not be that many differences from UNIX versions of Perl.
Robert Atkinson
Respected Contributor

Re: Perl on VMS

Craig, thanks for the response.

I wondering about file-open modes. All of the documentation I've read (limited so far) doesn't seem say anything about opening files in shared mode or private mode.

Also, I can't see anything about indexed files and index/key reads.

Am I jumping ahead of myself (Chapter 4) or is this something Perl can't handle?

Cheers, Rob.
Willem Grooters
Honored Contributor

Re: Perl on VMS

I just started as well - just trying to build 5.8.1 ('latest.tgz') and ran into some problems (Craig, you have noticed that - I'll comne to that in the mailing list, so Robert, indeed subscribe - helps a lot) but these can be solved, no doubt.

FYI: These have nothing to do with VMS/UNIX problems. It's a VERY smooth (though timely) build. I wish that this would apply to all OpenSource software ;-)

BTW - it seems 5.8.2 is out as well but I'm not certain that's for VMS as well.

(Off topic, but still: on perl.org, you get 'stable.tgz', via the vmsperl site, you get 'latest.tgz'. What's the difference?)

Willem Grooters
OpenVMS Developer & System Manager
Craig A Berry
Honored Contributor
Solution

Re: Perl on VMS

Robert,

File open modes can be handled much the same way they are in the extensions to creat(), fopen(), etc. avalable in C. Look at the docs to creat() in the CRTL manual. Then, for the corresponding access in Perl, look at:

$ perldoc VMS::Stdio

The VMS::Stdio extension is included in the core build.

For working with RMS indexed files, you'll need the add-on extension named, appropriately enough,
VMS::IndexedFile. See

http://search.cpan.org/~bhughes/VMS-IndexedFile-0_02/

Willem, the difference between "latest" and "stable" depends on where things are in the development cycle. Often they are the same, but when a new version is released, it is given the "latest" designation and then also considered "stable" if nothing too ugly turns up after the release.
Robert Atkinson
Respected Contributor

Re: Perl on VMS

Ahhhhhh! Found this is VMS::STDIO

shr=STRING
File sharing options. Choose one of the following:

del
Allows users to delete.

get
Allows users to read.

mse
Allows mainstream access.

nil
Prohibits file sharing.

put
Allows users to write.

upd
Allows users to update.

upi
Allows one or more writers.

Just what I was looking for!!

Cheers, Craig.
Martin P.J. Zinser
Honored Contributor

Re: Perl on VMS

Hello,

an example how to use VMS::Indexedfile (and a number of other modules ;-) can be found at

http://zinser.no-ip.info/vms/sw/notes/perl_mod.pl

Greetings, Martin
labadie_1
Honored Contributor

Re: Perl on VMS

Perl is a great, powerful langage, but I do not like it a lot, because it is a nightmare to maintain.

You should have a look at Python for Vms
available at
vmspython.dyndns.org
or at the mirrors.

Regards

Gerard
Martin P.J. Zinser
Honored Contributor

Re: Perl on VMS

Hello Gerard,

without starting a flame war ;-), as we used to say back in the days when I still was in Physics: You can write Fortran programs in any programming language ;-)
In this context here, you can write programs that are easy to maintain in Perl, Python, Cobol or DCL. You can also write programs that are next to impossible to maintain in any of these languages. It really depends more on the programmer and the culture in your organization than on the language you use. Having said that, I do admit that the obfuscated Perl contest certainly is much more fun than an obfuscated Cobol contest would be (although there are people out there who would claim Cobol to be obfuscated by design ;-)

Greetings, Martin
Ian Miller.
Honored Contributor

Re: Perl on VMS

and if you can't write it in FORTRAN then write it in assembler and if you can't write it in assembler it can't be done :-)

Personally I would use different languages for different types of jobs.
____________________
Purely Personal Opinion
labadie_1
Honored Contributor

Re: Perl on VMS

Hello

See an example of accessing an indexed file with Python at

http://vmspython.dyndns.org/docs/python_vms/reference_manual_003.html#example_7-1

I find it quite easy to read and maintain.

I agree with you, Martin.

regards

Gerard