When I double-click on the “perl.exe” icon in Explorer, I get an empty DOS window with a blinking cursor. What gives?
Perl for Win32 is a Win32 command-line program. It expects to be run from the command line, not from Explorer. If you want to run a Perl script, write the script out using a text editor like Notepad. A good starter program is: print “Hello, World!\n”; Save the program to a file on your hard disk (such as “C:\temp\hello.pl”). Now, start a command prompt window (sometimes erroneously called a “DOS window”), and type the following line at the command prompt: C:\> perl c:\temp\hello.pl This should print out the words “Hello, World!” on the screen. You may have to do some fiddling with the PATH environment variable, or specify the full path name to perl.exe, in order for this to work. perl.exe has a lot of nifty command-line arguments that can make your work a lot easier. See the perlrun documentation page for details. To answer the original question about what’s happening when you start perl from an Explorer window rather than a command-line window: starting from Explorer is roughly the sa
Related Questions
- Why isn the mouse cursor shape (the little icon shape where the mouse pointer is) correct as I move from window to window?
- When I double-click on the "perl.exe" icon in Explorer, I get an empty DOS window with a blinking cursor. What gives?
- My application has to close the IE. How can an application close the Internet Explorer or an Explorer window?