Running a perl script on Windows 95 
Author Message
 Running a perl script on Windows 95

I have a Perl script that is running fine on UNIX. I now want to run it
on Windows 95 but it is not being executed at all. I am suspecting that
it cannot even find the Windows version Perl interpreter that I
installed. What is the Windows equivalent of the first line used for
UNIX (#!/usr/local/bin/perl) that tells where the Perl interpreter is?
Any other details that I should pay attention to as well? Thanks.



Sun, 13 Aug 2000 03:00:00 GMT  
 Running a perl script on Windows 95



Quote:
> I have a Perl script that is running fine on UNIX. I now want to run it
> on Windows 95 but it is not being executed at all. I am suspecting that
> it cannot even find the Windows version Perl interpreter that I
> installed. What is the Windows equivalent of the first line used for
> UNIX (#!/usr/local/bin/perl) that tells where the Perl interpreter is?
> Any other details that I should pay attention to as well? Thanks.

There is no equivalent. The standard win95/NT/DOS shell is too
braindead to do anything like that. Execute your perl scripts like
this:

blabla> perl -w script

You can try associating .pl extensions with the perl executable, but
that is a win95 specific thingie.

Martien
--
Martien Verbruggen                  | My friend has a baby. I'm writing down
Webmaster www.tradingpost.com.au    | all the noises the baby makes so later
Commercial Dynamics Pty. Ltd.       | I can ask him what he meant - Steven
NSW, Australia                      | Wright



Mon, 14 Aug 2000 03:00:00 GMT  
 Running a perl script on Windows 95

There is still another option,  someone wrote a 16 bit Pascal program that
is complied.  You rename #!perl.exe to {scriptname.exe -- to match
scriptname .pl} put the script, this exe and perl exe in a directory in you
path.   Then run  scriptname.  If I remember right it does a nice job of
file redirect which the bat jobs can't do.  The problem is you end up with
loads of these file sitting around that are all the same except the name.  I
haven't tried it in NT tho.  I can dig up the code if you are interested.

Kathy

Quote:

>I have a Perl script that is running fine on UNIX. I now want to run it
>on Windows 95 but it is not being executed at all. I am suspecting that
>it cannot even find the Windows version Perl interpreter that I
>installed. What is the Windows equivalent of the first line used for
>UNIX (#!/usr/local/bin/perl) that tells where the Perl interpreter is?
>Any other details that I should pay attention to as well? Thanks.



Thu, 17 Aug 2000 03:00:00 GMT  
 Running a perl script on Windows 95

Why not asscoiate the file type with windows?

Quote:

>I have a Perl script that is running fine on UNIX. I now want to run it
>on Windows 95 but it is not being executed at all. I am suspecting that
>it cannot even find the Windows version Perl interpreter that I
>installed. What is the Windows equivalent of the first line used for
>UNIX (#!/usr/local/bin/perl) that tells where the Perl interpreter is?
>Any other details that I should pay attention to as well? Thanks.



Tue, 22 Aug 2000 03:00:00 GMT  
 Running a perl script on Windows 95

Unfortunately, Windows doesn't have an equivalent for the hashbang (#!).
ActiveState (and possibly the GS port as well, but I'm not sure about this)
will read any flags you have after the hypothetical name and act on them,
but that's about it. So if you head off your program with

#!/usr/bin/perl -w

as you should, you still get warning messages, but it doesn't help in
finding the Perl executable.

You can associate perl scripts with winperl through the View / Options item
in the My Computer menu (it's in a slightly different spot for Active
Desktop), but the best thing to do is add it to your path. Under NT you can
do this through the System control panel. Under Win95 you need to modify
AUTOEXEC.BAT (or create it if you don't have one). Me, I don't bother with
setting up Perl scripts to run when you double-click. I just open up a
command prompt window to start with.

This is, by the way, a FAQ, but I don't remember the number.

--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl

Quote:
>I have a Perl script that is running fine on UNIX. I now want to run it
>on Windows 95 but it is not being executed at all. I am suspecting that
>it cannot even find the Windows version Perl interpreter that I
>installed. What is the Windows equivalent of the first line used for
>UNIX (#!/usr/local/bin/perl) that tells where the Perl interpreter is?
>Any other details that I should pay attention to as well? Thanks.



Tue, 22 Aug 2000 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Running a VT100 perl script in Windows 95

2. Test running PERL script in Windows 95

3. Running a perl script in the background on Windows(95/NT)

4. Perl on Apache 1.3.3 running on Windows 95/NT

5. How to run perl in Windows 95?

6. Eat my dust - Perl running on Windows 95

7. Problem running system commands from Win32 perl under Windows 95

8. Can multiple processes be run under windows 95

9. Windows 95 (HIP) I can't get debugger to run

10. make ftp on perl script with windows 95/NT

11. how to call perl script in Windows 95

12. Perl and Windows 95 Login Scripts?

 

 
Powered by phpBB® Forum Software