简体   繁体   中英

ActivePerl not working on Windows 8.1 64-bit

I'm new to ActivePerl. However, I need to using it on my new Windows 8.1.

I try to download both 5.26.1.2601 and 5.24.3.2404 (x64) to installed.

But when I run with file.pl and file.bat, it would be suddenly closed in few second.

Then I need to test with different Windows OS. I saved these files to my daughter's computer that is Windows 7 32-bit and surprise that all works very well just clicking.

I already set PATH to C:\\Perl64\\bin and C:\\Perl64\\site\\bin but it still not working.

So, I doubt why problem occured on my Windows 8.1 and how to solved its?

Thank

I suspect you are running them by double-clicking them. This runs the program and immediately exits (losing all output) as soon as the program is done. For toy programs that's practically immediately.

What happens when you run the programs from a Command Prompt (or PowerShell) window?

I suggest brian d foy's response is on target, but there's more. The windows OS needs to be CAREFULLY APPENDED include the path to the perl interpreter in the system environment variable PLUS the computer might need a RE-BOOT, or the command window in use will need a PATH revision to update the path to include that same directory location for the perl interpreter. You stated that the path was set, but not clearly; was that in the command prompt window or via the system environment variable? I suggest updating the PATH environment variable in the system via the Windows control panel.

The call to run the perl script could be made from the directory containing the perl script, or the path to the script needs to precede the call, such as: c:\\directory-a\\dirctory-b\\file.pl ---running file.pl from c:\\users\\mysuername isn't going to cut it, unless that just happens to be where the perl script lives.

A debugging suggestion, add the following statements to your perl script:

print "my script runs!";
sleep 4;

and see if anything shows on the screen. If you run from the command window rather than double-clicking the file in File Explorer, the window shouldn't disappear.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM