running perl from command line interface - NT 4.0 
Author Message
 running perl from command line interface - NT 4.0

Hi,
I have successfully installed activeware perl. I appended the path
variable on my system ton incoude the directory where all my perl
scripts live. Then I did this:

 ASSOC .pl=PerlScript
   FTYPE PerlScript=[full path to perl]\perl.exe %1 %*

Let's say I have a fred.pl script that expects two arguments. Now, from
the command line interface , in any directory, I should be able to
type::

fred  2  2  (where 2 and 2 are the args passed by $ARGV[0] and $ARGV[1])

This used to work for me, but now it doesn't. Any tips

thanks,

Paul
--
To respond to this posting, remove -nospam- from my email address.
Sorry for the inconvenience



Wed, 18 Jun 1902 08:00:00 GMT  
 running perl from command line interface - NT 4.0


Quote:
> Hi,
> I have successfully installed activeware perl. I appended the path
> variable on my system ton incoude the directory where all my perl
> scripts live. Then I did this:

>  ASSOC .pl=PerlScript
>    FTYPE PerlScript=[full path to perl]\perl.exe %1 %*

> fred  2  2  (where 2 and 2 are the args passed by $ARGV[0] and $ARGV[1])

I don't think Windows executes programs without specifying (sp?) the entire
program name.  The exceptions are .exe, .bat, and .com.

fred.pl 2 2

Lauren



Wed, 18 Jun 1902 08:00:00 GMT  
 running perl from command line interface - NT 4.0

Quote:

>Hi,
>I have successfully installed activeware perl. I appended the path
>variable on my system ton incoude the directory where all my perl
>scripts live. Then I did this:

> ASSOC .pl=PerlScript
>   FTYPE PerlScript=[full path to perl]\perl.exe %1 %*

>Let's say I have a fred.pl script that expects two arguments. Now, from
>the command line interface , in any directory, I should be able to
>type::

>fred  2  2  (where 2 and 2 are the args passed by $ARGV[0] and $ARGV[1])

>This used to work for me, but now it doesn't. Any tips

You're close.  :)

On NT, you also need to add .PL to the value of %PATHEXT%.  It should look
something like this:

.COM;.EXE;.BAT;.CMD;.PL

Then, the .PL extension is treated like the others in the list - you don't
have to type it anymore.

Hope this helps.



Wed, 18 Jun 1902 08:00:00 GMT  
 running perl from command line interface - NT 4.0

Quote:

> Hi,
> I have successfully installed activeware perl. I appended the path
> variable on my system ton incoude the directory where all my perl
> scripts live. Then I did this:

>  ASSOC .pl=PerlScript
>    FTYPE PerlScript=[full path to perl]\perl.exe %1 %*

> fred  2  2  (where 2 and 2 are the args passed by $ARGV[0] and $ARGV[1])

You need to include .PL in the PATHEXT environment variable.  Do it in
the system portion and you'll be happier longer! ;vD


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Piping problem running perl script from NT command line

2. Running Command Line Commands

3. Just build perl 5.00503 on NT 4.0 with SP4, but first run fails

4. Running Perl thru IIS 3.0 on NT Server 4.0

5. Problems running Perl 5 on NT 4.0/Netscape Enterprise 3.0

6. Need help with Perl running on NT 4.0 server

7. How to run a command at the command line

8. PERL(NT) for Win32 and SYSTEM Calls in NT 4.0 (worked in NT 3.51)

9. Win32::Process not run app. in NT 4.0

10. NT 4.0 IIS 4.0 Perl v5.6.1 build 631

11. SNMPCLI - SNMP Command Line Interface

12. command line interface for save as text in netscape

 

 
Powered by phpBB® Forum Software