Recently a perl program I wrote and that I and many others have been using for man years started failing on my Windows XP Pro PC (running Activestate perl 5.8.1). Here's s simple test setup:
Script1 calls script2 which calls script3
Script1
open(S2,"script2 |"); while (<S2>) {print;} close S2;
Script2
print "Script2\n"; system("script3");
Script3
print "Script3\n";
Previously when I ran script1 I got 2 lines of output:
script2 script3
When it fails I only get one output line
script2I did modify script3 to write a file just to prove it was actually getting executed.
However, recently (after 1/18/2012), after a number of hours of poking around on 2 different PCs I finally determined that as long as I have ".plx" in the PATHEXT variable I only get the one output line, "script2". If I take ".plx"out of PATHEXT I get both lines of output. I've had ".plx" in PATHEXT for many years.
Does anyone have any idea what could be causing this strange behavior? For reasons I wont' go into here I'd like to be able to keep ".plx" in PATHEXT. I have added a line in the "real" script1 to remove ".plx" from PATHEXT at the beginning of the script and that makes it work. However, that is not a good solution for other scripts. Also, I'm concerned that other strange behaviors might occur that aren't as apparent.
In reply to Strange behavior with .plx in PATHEXT by ccw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |