
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.