Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl script not recognized

Status
Not open for further replies.

rozzay

Programmer
Joined
Jan 3, 2002
Messages
142
Location
US
Good afternoon,

I have installed ActiveState Perl 5.8 onto my machine Windows 2003 and tried running a simple perl script but received the error message below.
"The name specified is not recognized as an
internal or external command, operable program or batch file."
Would I need to reboot the machine in order to have Perl in place? Or do I need to install something else? Is my perl an old version?

Thanks in advance!
 
Take a look at the file "index.html" in the Perl/html folder, in particular the topics under "Windows Specific".
 
I currently have a test environment set-up and it is the exact duplicate. The test is also using Windows 2003. I looked at the topic Windows Specific and did not see information on Windows 2003. The weird thing is when I am running the script on the command prompt I usually run the script by typing "perl scriptname.pl" and I would get the error message but if I just type the "scriptname.pl" but no perl the script runs why is that?
 
You may have to reboot to ensure that perl.exe can be found on your path

HTH
--Paul

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
That's just the way windows is. When you run perl scripts from the cmd prompt, you'll always need to run it with
Code:
[blue]perl[/blue] somescript.pl
When your using the cmd prompt, windows doesn't check for file associations like it does if you run a file in the GUI. For example, you can't just type "somefile.doc" and expect it to open in word (well, you could, but it won't work.) The only things that will execute are, well, executables - .exe, .com, and .bat files. Since 'perl' is the executable, you'll need to use that to get your script to run.
 
Did you add perl to your path? If so you should open a NEW command prompt and run it (path won't be updated for an open cmd prompt during installation). From that point you should simply be able to type script.pl ....



-Chris Larivee
 
Ok, not sure what I was thinking. It wasn't working on my box at work, but I've tried it again and it does work. So, I stand corrected - it does work. Just ignore me. :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top