Question

how to use a perl compiler on Windows.

Asked by: morganferriter

Hi, Ive recently downloaded the 'stable' version of perl for Windows. I am currently using NT. It has downloaded but Im not too sure what to do next. I am familiar with some Perl syntax and have Visual Basic and HTML experience but not CGI scripting. What is my best approach? Can note-pad be used as a compiler and if yes, where can I run the programs? Many thanks, Morgan

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2001-02-19 at 08:46:20ID20080130
Tags

compile

,

how

,

perl

,

windows

Topic

Perl Programming Language

Participating Experts
8
Points
0
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Perl & CGI
    Hi! Here are my questions: (They're relevant to each other) 1) How do I get the cgi-bin.pl and where should it be placed ?     How the *.cgi calls it ? or maybe the html document     should call it?  2) How can I change a  *.pl  file to a  *.cgi  file?     Should I use a co...
  2. CGI and Perl
    How do you get Perl to edit .pl files? I can't seem to get it to open my files, or for that fact, to even open up, period. What file opens up Perl????? Thanks
  3. CGI-PERL
    1.What is perl? 2.How to make application for form processing?(in detail)

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: cpa802Posted on 2001-02-19 at 09:03:20ID: 5856453

PERL isn't actually compiled, it is interpreted at runtime like unix shell scripts so yes notepad can be used to write your scripts. As for running the programs I only have limited experience with PERL and windows but I assume that you will need some sort of web server on your comupter, I recommend Apache for windows, its free and I'm relativly sure you can get it to work with PERL CGI's. It's downfall is that it expects you to understand how to configure a UNIX web server so you might run in to some problems configuring it (it does come with default settings that work for most PC's).

 

by: hilltopPosted on 2001-02-19 at 09:13:07ID: 5856490

You can run your scripts from anywere just double click them make sure they are associated with perl.exe
E.G.
I created a new text document
new textdocument.txt

and added this code to the file

print qq~
hello world
~;
then renamed it whatever.pl


now i can run it from the command promt

start run type command

then c:\whereever\whatever.pl

to run as CGI we need a bit of info what http server are you using

 

by: to_be_determinedPosted on 2001-02-19 at 09:21:40ID: 5856522

ActiveState has PerlApp that will compile a Perl script to an .exe executable.  Excerpt from ActiveState.com (source: http://www.activestate.com/Products/Perl_Dev_Kit/index.html):

PerlApp
Turns your Perl scripts into executables, so that you can run Perl scripts on computers without installing Perl.

 

by: hilltopPosted on 2001-02-19 at 09:24:12ID: 5856529

yeah its pretty sweet
not free though

 

by: to_be_determinedPosted on 2001-02-19 at 09:24:15ID: 5856530

I forgot to mention that PerlApp is part of ActiveState's PDK (Perl Development Kit) 2.0.

I have used PDK's PerlApp and found it easy to get what I want it to accomplish.

Hope this helps.

 

by: maneshrPosted on 2001-02-19 at 10:32:25ID: 5856766

morganferriter,

".. What is my best approach? Can note-pad be used as a  compiler and if yes, where can I run the programs? "

PERL in an interpreted language, so it does not need any kind of compiling.

You can use Notepad as an editor to create your PERL scripts. in fact, you can use any editor, as long as the editor allows you to save the file as a text file.

Since you also want to use PERL as a CGI language, you will need to have a web server installed and configured on your Windows system.

Although there are a lot of free web servers available, i would suggest you use IIS for NT.

IIS 4.0 is contained in the Windows NT 4.0 Option Pack. You can download Windows NT 4.0 Option Pack from ...

http://www.microsoft.com/msdownload/ntoptionpack/askwiz.asp


After you have downloaded and installed IIS, you need to configure IIS to work with PERL.

You can follow these steps to do the same.

Creating a Test PERL Script
======================

Open a new file with Notepad, and copy the following lines of code. Save the file in the scripts directory as
"helloworld.pl".

$url = "http://$ENV{SERVER_NAME}$ENV{URL}";
$ip = "$ENV{REMOTE_ADDR}";
print <<ENDOFTEXT;
HTTP/1.0 200 OK
Content-Type: text/html

<HTML>
<HEAD><TITLE>Hello World!</TITLE></HEAD>
<BODY>
<H4>Hello World!</H4>
<P>You have reached <a href="$url">$url</a></P>
<P>Your IP Address is $ip</P>
<H5>Have a nice day!</H5>
</BODY>
</HTML>
ENDOFTEXT
exit(0);

NOTE: The PERL language allows no spaces at the beginning of a line. Once you have created the file, you need to
configure PERL to run securely with Internet Information Services. "Perl.exe" should not be located in any of the
directories accessible by a user with a browser.

By using the Internet Service Manager MMC Snap-in, you can place the "Perl.exe" or "PerlIS.dll" outside of the normal
Web directory structure a user has access to and use the "Script Mapping" feature of IIS to configure execution of
PERL scripts.

Configuring PERL Script Mapping
==========================

1.Select the Internet Services Manager (ISM) under the "Administrative Tools" menu.

2.Right-click a Web site that you want to enable PERL for and select Properties.

3.Select the Home Directory tab.

4.Click Configuration button.

5.Click Add.

6.Enter the following for the "Executable":

  <full path to perlis.dll>\perlis.dll

  Or the following:

  <full path to perl.exe>\perl.exe %s %s

  NOTE: The "%s %s" is case sensitive (for example, "%S %S" will not work)

7.Enter the following for the "Extension":

  .pl

  NOTE: Make sure that the "All Verbs" radio button is selected for full functionality

8.Click "OK" all the way back to the ISM

9.Using the default scripts directory with IIS, the URL would be the following:

 http://<Server Name>/scripts/helloworld.pl

 

by: jwcsPosted on 2001-02-20 at 13:41:06ID: 5861455

Hi,

When I started out doing CGIs under Windows I used the Xitami web server.  It's free and dead easy.  I used ActiveState's ActivePerl interpreter...I had no need to really do any proper setting up and the two worked great together.  Apache works nicely once you get your head round it's (fairly simple) congifuration file.

http://www.xitami.com/
http://www.activestate.com/

Jonathan

 

by: klamerusPosted on 2001-02-22 at 20:52:02ID: 5870268

While you CAN use notepad to edit Perl scripts, I find that PerlBuilder (not free, but cheap) is an excellent environment for script development.

ActiveState also has an IDE (actually 2 now), but I don't find them as easy to work with as PerlBuilder.

PerlBuilder allow running of scripts; has color coding; supports a simulated CGI environment; and will give you access to output, error codes, watchpoints, stepping through code, etc.

Really quite nice.

On the side, I would recommend getting a subscrition to The Perl Journal.  It talks about the various products, has interesting and fun articles, etc.

Also visit the Oreilly web site and work your way into their perl stuff.

As far as has been stated above, ActiveState has the best support of Perl on Win32.  Their basic perl interpreter is free, but you do have to pay for their PDK (perl developer kit).  This gives you the ability to create executables and COM components (or use COM components) on Win32.  They also have a very nice distribution of the mods with the mod library on disk.  The cost isn't a lot and having everything you need on a single CD is very, very handy.

HOWEVER, once you've drunk the magic coolaid, don't expect to be able to create your own mods or get creative with modifications to the CPAN distribution.  It doesn't sound like you're at this point however and so if you do have the cash I would recommend making your initial experience an easy and fun one.  Always time for turning into a perl geek later :-).

 

by: maneshrPosted on 2001-03-19 at 21:12:05ID: 5942463

morganferriter,

Did you get the solution you were looking for??

What solution, if any, did you use??

Pl. let us know.

 

by: astaecPosted on 2001-04-30 at 10:29:13ID: 6040351

Good morning, morganferriter,

You've asked 14 questions, with no updates since people have posted recommendations, and all of them remain open.  It would be most appreciated if you could revisit your questions and update them with comments if more information is needed, so that we can help you resolve and close those items.  If you've been helped, and the issues are resolved, you should be able to accept the pending answers, or choose the comment which best served you as the answer to grade and close.

Thank you very much,
Asta

 

by: astaecPosted on 2001-05-15 at 06:46:14ID: 6081567

Good morning, morganferriter.

You have asked 15 questions here, received input from various experts, yet all 15 items remain open today.  In order to achieve your goal, it is highly recommended that you provide feedback on your issues so that

1)  you can get the needed solution
2)  open questions are resolved
3)  when the answer is found and you choose the comment which served you as the answer to then close and grade provides help to others that may need it as this question then migrates to the PAQ.

I'll post this in your open items, so that you'll get an Email notif making it easier for you to follow up on your open items.

Best of luck, and thank you for your responsiveness.

Asta

 

by: modderPosted on 2001-08-11 at 09:34:55ID: 6375785

Hello everybody,

the morganferriter account has been closed after persistent failure to follow up on his questions, after several reminders to do so.

Which leaves us to clean up after his many open questions. I would appreciate it if the participants on this question can advise on how we shall proceed on this. Do you believe that anyone deserves points for this, or should the question be deleted and forgotten?

Thank you for your cooperation

modder
Community Support Admin

 

by: to_be_determinedPosted on 2001-08-11 at 20:59:34ID: 6376670

Everyone who participated should be rewarded some points, IMHO.

 

by: klamerusPosted on 2001-08-12 at 08:19:41ID: 6377297

There's only 50 points in question here and several correct answers.

I would suggest just closing all of this person's question and awarding no points.  Chalk up the lack of points to the user (who caused the problem).

In this case, unfortunately, it took several people's responses to really answer the question.  The first person was right (you don't need a compiler), but was wrong (you don't need to run perl in a web server).  Follow-on replies cleared things up, but things just sort of dribbled in.

Leaving the whole thing available for others might be nice.

 

by: modderPosted on 2001-08-12 at 10:30:53ID: 6377582

Thanks klamerus,

OK, that is a good idea, so I have reduced the points for this question to 0 (sorry), but I'll give it to you so at least you'll get an "A" in your profile to show for it <g>

modder
Community Support

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...