All of a sudden, perl scripts don't work unless I prefix them with “perl” and give full path to the script

I've been using my own personal environment that's worked consistently for over 20 years. I started incorporating many perl scripts about 14 years ago. I've been using the same tree of command-line interpreters for 22 yrs (NDOS->4DOS->4NT->TCMD, all the same program really).

I just switched from ActiveState windows perl to Strawberry Perl.

For years, this is all I've needed to run a perl script:

SET .pl=perl

This is how you specify what program to open things with.

this I can simply do:

c:\>test.pl
Hello, world!

Things just worked. Forever.

Today, in a week-old OS, things just stopped working.

Perl scripts will run, but they won't DO anything. No error. No output. Nothing.

The only way it works is if I prefix the script with "perl" (in which case, my path isn't searched because script name is now a parameter, so I'm left having to fill in the full path for the script)

Here's what it's like to be me:

C:\>test.pl

C:\>perl test.pl 
Can't open perl script "test.pl": No such file or directory

C:\>perl c:\bat\test.pl 
Hello, world!

Note that this was working fine yesterday, even earlier today. I don't know what changed this and what broke it, and I've looked quite a long time, found similar but not identical issues - and no fix has helped.

I hvae a boatload of scripts. I would really hate to have to insert the world "perl" before every one of them, and then qualify the full path!

Realistically, I will probably have to write a perl.bat wrapper that converts the parameter filename into a fully qualified path, and explicitly calls perl.

I really don't want to do that. That's a ban-aid solution. I want to understand what is wrong, address is, and resolve it.

I'm starting to hate Windows 7...

8
задан Toto 27 May 2011 в 12:41
поделиться