> When I write my perl scripts on UNIX, the first line I would
> usually put:
> #!/usr/bin/perl
>
> Stating that that's where to find the perl binary to run the
> script, and so I can just type "perl_script" instead of
> "perl perl_script" to run it.
>
> Can someone shed me some light on how to do that on VMS?
Easy: you can't. That functionality of the UNIX shells doesn't
exist in DCL (the VMS shell).
> Again, I don't know anything about VMS and right now the way
> I even get "perl" to be recognized as a command is by typing:
> PERL :== $PERL_ROOT:[000000]PERL.EXE
Installing perl should have generated a
PERL_ROOT:[000000]PERL_SETUP.COM which defines this and other
symbols.
> and then I can start typing "perl perl_script" to run stuff.
Another possibility (installation of the perl command in the
DCL command table) is described in the README.VMS that comes
with the source distribution.
> In addition, how do I turn that perl script into a command?
> on Unix I'd just do chmod 755 perl_script
See any .COM file in the PERL_ROOT:[UTILS...] tree:
You prefix the perl script with
$ perl 'f$env("procedure")' "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'"
"''p7'" "''p8'"!
$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and
$ARGV[$#ARGV] eq ''){pop @ARGV;}
eval 'exec -S $0 ${1+"$@"}'
if $running_under_some_shell;
(this probably wraps)
name it perlscript.COM and call it like any other DCL command
procedure.
With OpenVMS/Alpha v7.x there's a logical named DCL$PATH. Using that
you could call the command procedure by its name (leaving out the @).
cu,
Martin
--
One OS to rule them all | Martin Vorlaender | VMS & WNT programmer
One OS to find them | work: [EMAIL PROTECTED]
One OS to bring them all | http://www.pdv-systeme.de/users/martinv/
And in the Darkness bind them.| home: [EMAIL PROTECTED]