×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Setting Perl up on Windows

Setting Perl up on Windows

Setting Perl up on Windows

(OP)
I installed Perl on my windows 98 machine and registered the .pl and .cgi extensions as well as .plx

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.

What do I need to do?

Today I installed windows 2000 pro, but the perl script runs in the DOS window as noted above.

RE: Setting Perl up on Windows

Perl will pretty much always run in DOS. (I actually downloaded a "GUI Perl Editor" 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.

Liam Morley
lmorley@wpi.edu
] :: imotic :: website :: [
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."

RE: Setting Perl up on Windows

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



RE: Setting Perl up on Windows

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.

RE: Setting Perl up on Windows

Two suggestions:
  1. dual boot to linux and run perl from your linux partition... it's free!
  2. shell out $10/month for an account on a server

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.
http://www.oac-design.com

RE: Setting Perl up on Windows

My turn to disagree, tanderso.

Perl 5.6 -- the latest release available from http://www.activestate.com/Products/ActivePerl or http://www.perl.com/pub/language/info/software.html -- 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 "make" 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

RE: Setting Perl up on Windows

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.
http://www.oac-design.com

RE: Setting Perl up on Windows

<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

RE: Setting Perl up on Windows

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.
http://www.oac-design.com

RE: Setting Perl up on Windows

This way is not the best, but at the end of each of your perl scripts, put this snippet of code:


while(<>) {
   exit;
}



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

Hope this helps.

-Vic

vic cherubini
malice365@hotmail.com
www.epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
Wants to Know: Java, Cold Fusion, Tcl/TK
====

RE: Setting Perl up on Windows

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: " not implemented or not intergrated" (or something like that because my browser is dutch).

How can I make it work?

Eek

RE: Setting Perl up on Windows

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

RE: Setting Perl up on Windows

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^)

RE: Setting Perl up on Windows

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.
http://www.oac-design.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close