455,848 Members | 1,359 Online
Need help? Post your question and get tips & solutions from a community of 455,848 IT Pros & Developers. It's quick & easy.

# perl.exe vs. cmd.exe

 P: 57 A few days ago, i was trying to make my perl script an executable (with no success). but that's not the direction of my question (at least not right now). Once i stopped trying to make the executable work, i ran my perl script as a perl script (*.pl), but now when the console window comes up when it runs, i noticed that it's running through C:\Windows\system32\cmd.exe instead of C:\Perl\bin\perl.exe...which is causing the script to freak out and not run properly! The first line in my code is Expand|Select|Wrap|Line Numbers #!/usr/bin/perl which looks for the perl interpreter. WHAT DID I DO?!?! And how can i get it back to normal and execute using perl.exe?? By the way (if this helps), i tried making the perl script an executable by using PAR and also Perl2Exe. Mar 25 '08 #1
 P: 57 If you want to click on your perl program and have it run you have to associate .pl with the perl executable. Thanks Kevin, this is where the root of my question is...how do i associate the .pl with the perl executable when i just doubleclick to run it? i know how to make the dos window go away while the script is running. i will use the following two lines: Expand|Select|Wrap|Line Numbers my $hw = Win32::GUI::GetPerlWindow(); Win32::GUI::Hide($hw); Mar 26 '08 #3
 Expert 2.5K+ P: 4,059 Thanks Kevin, this is where the root of my question is...how do i associate the .pl with the perl executable when i just doubleclick to run it? i know how to make the dos window go away while the script is running. i will use the following two lines: Expand|Select|Wrap|Line Numbers my $hw = Win32::GUI::GetPerlWindow(); Win32::GUI::Hide($hw); Since file association can be very different depending on what version of windows you are running, I suggest you ask on a Windows forum how to associate a file type with an executable. Or just try reading the Windows help files. Mar 26 '08 #4