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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Perl up on Windows 1

Status
Not open for further replies.

kyoko

Technical User
Mar 3, 2000
4
0
0
US
I installed Perl on my windows 98 machine and registered the .pl and .cgi extensions as well as .plx<br><br>But when I execute a perl script, all that happens is the DOS windows opens for a few seconds and the text of the perl script flashes by.<br><br>What do I need to do?<br><br>Today I installed windows 2000 pro, but the perl script runs in the DOS window as noted above.
 
Perl will pretty much always run in DOS. (I actually downloaded a &quot;GUI Perl Editor&quot; once, and the Perl still ran in DOS. whatever.) Trick is, if you want to see what's on the screen first, open DOS. Then the screen won't disappear when the script is done. <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence."
 
Have you tried running perl from the command line.

Go to start>run> type in: command, and hit enter.

the dos window should pop up.

If you store your perl scripts on desktop: eg test.pl
Change the C:/ to C:windows/desktop if necessary (type cd desktop).

Then type:
perl test.pl and hit enter, it should run.

good luck

ratz



 
Hi,

One way to keep the window open, is to run your Perl script
from a batch file. Let's say your script is hello.pl , then create a batch file with one line in it :
perl <path>\hello.pl
Then right click the batch file -> properties -> program
and uncheck close on exit.

It works for me, although I usually work from a prompt.
 
Two suggestions:
[ol][li] dual boot to linux and run perl from your linux partition... it's free!
[li] shell out $10/month for an account on a server[/ol]
Perl and linux are a natural match. Windows doesn't play well with anything but VB. If your target platform is Windows, don't use Perl. If your target platform is Unix, then develop on the right system.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
My turn to disagree, tanderso.

Perl 5.6 -- the latest release available from or -- was developed around both the Unix/Linux and 32-bit windows systems, not just ported from its Unix roots. Between the platforms, you won't find, as far as I'm aware, any syntactical or functional differences.

While Linux may find more uses for Perl in administrative tasks than, say, Windows 98, it shouldn't be assumed that Linux is solely where Perl belongs. Windows is an excellent learning platform, offering people a familiar environment to develop in (WordPad is significantly easier than vi ;) and a chance to focus on strictly the Perl language, rather than the numerous quirks of Linux in general. I think it is a disservice to Larry Wall and all others involved in the language's development to encourage that sort of bias.

All in all, Linux may be the place to put a knowledge of Perl to work, but for novices who are using Perl as an introduction to the C-style family of programming languages and who are not likely to have worked in a console environment, Windows will definitely suffice for learning.

Oh, and don't get me wrong -- I am a huge Linux advocate... I don't like to see people run scared from it the first time they go through the &quot;make&quot; process. Better to equip 'em with a fundamental language and understanding of other languages before sending them in.

Thus ends this entirely ignorable diatribe.

brendanc@icehouse.net
 
I disagree. Perl is fundamentally a unix language. It's like snowboarding... if you skateboard first, then snowboarding is easy, otherwise it is hard to pick up. That's the relationship between linux and perl. The syntax of perl is a mix of C and shell programming. It will be easier to pick up both perl and linux if they are used together. Better yet to get a handle on linux first. There is really no reason to use perl with windows except that microsoft decided to port it for compatibility in their web server. You shouldn't be using windows for web serving either... but that is another discussion. The point is, I shudder when I hear perl and DOS used in the same sentence because they are polar opposites, like water and oil. Sure, you can make mayonaise by porting perl to windows, but it's an unhappy mix.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
<grin> with the number of ppl serving the web from windows and using perl to do it - you seem to be on your own there Tom...
Mike
michael.j.lacey@ntlworld.com
 
Large number, maybe. Majority? Far, far from it. I do believe apache is still the #1 web server on the net. But, yes, there is a large misguided group who do that. That's no excuse though.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
This way is not the best, but at the end of each of your perl scripts, put this snippet of code:

[tt]
while(<>) {
exit;
}

[/tt]

Then all you have to do is press Enter and the console will close.

Hope this helps.

-Vic

vic cherubini
malice365@hotmail.com
====

Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director

Wants to Know: Java, Cold Fusion, Tcl/TK

====
 
I've got a compiler for Perl.
It works fine when I type

perl search.pl (that's the file i want to excecute)

But when I want to test it local with my webserver it doesn't work.

I've got a form witch posts the results from that form to the search.pl file. When I post the form my Internet explorer gives an HTTP 501/505 error. It sais: &quot; not implemented or not intergrated&quot; (or something like that because my browser is dutch).

How can I make it work?

Eek
 
eek,
I post this with a friendly support attitude. You are spamming us here. Try to stay either in one forum or the other, Perl or CGI-BIN. Pick one of the several threads you have started for this and go with it. Given the fact that your Perl interpreter seems to work, I think CGI-BIN is the place to pursue getting CGI apps to work. It will help us help you.

Really, I'm not trying to fuss, just trying to get all this in one pile.

Thanks ;^)




keep the rudder amid ship and beware the odd typo
 
Ahem!

You think eek's post is off topic? Look at the string of posts above. (and also check out both mine and yours, lol!)

8^)
 
Yeah, but Eek's post is duplicated across several threads in several forums. At least we keep all of our related off-topic posts in one thread ;-)
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top