| [reply] |
If you use Activestate's Perl distribution, Windows should recognize the file if you add an ".pl" extension. That way, you can just double-click it in e.g. the explorer. Some more hints:
- If you need to run programs on a regular basis, take a look at the Windows Scheduler (included from Win98 onwards).
- Open Perl IDE is a nice IDE for Perl on Windows.
- Take a look at the PPM utility to install precompiled modules
- You will need MS Visual C++ if you want to compile your own modules for Activestate Perl
Hope that helps!
| [reply] |
I too was trust into a windows world after working on Unix
systems most of my career. To keep yourself from going utterly
mad install cygwin | [reply] |
| [reply] [d/l] [select] |
Pretty much the same way you would on Windows. I just learned this myself over the weekend. Install ActiveState's Perl distribution, learn PPM/ASPN, enjoy! Well, as much as one might enjoy working on Windows. ;-)
Seriously, it's pretty simple. Once you have it installed, just write a test script using the new path for perl. Mine was C:\Perl\bin\perl. Yours might be different.
When you want to run a script, just make sure it's executable, or simply call the perl binary as the interpreter. Example:
C:> Perl\bin\perl path\to\script\hello world.pl
Hello World!
Pretty simple. In fact, installing Perl modules is even easier (IMHO) under Windows. Fire up the PPM program:
C:> Perl\bin\ppm
> install CGI::Application
.... yadda yadda ....
Works great for me. I've managed to "port" a number of my web applications written in CGI::Application and HTML::Template with minimal edits. Usually, it's just a matter of changing the shebang line, as mentioned above. Of course, these are primarily webserver-level scripts I speak of. System-level stuff will definitely require much more work.
HTH!
-fp | [reply] [d/l] [select] |
At the command prompt, type: perl <scriptname>
this is assuming the path to perl is in your path. Otherwise, you might also try: C:\Perl\bin\perl <scriptname> (That works for ActiveState Perl anyway)
If the .pl extension is associated with the Perl binary, you can also double-click on the script in Explorer.
| [reply] |
In addition to the above answers, I would like to say about using Perl in web applications. I've installed and configured Apache 2 with mod_perl 2 (I have got Perl 5.8 on my computer) and Mason but I cannot install Embperl 2 because module for ActivePerl is not exist and doesn't compile under win32, Apache 2 and mod_perl 2. Also, I've had problem with Net::Pcap, but I've found Net::Pcap and Net::PcapUtils in the repository one guy (see here, if you are interested).
But, in general, Perl works under win32 without big problems.
I would like to suggest you IDE for Perl:
- HTMLKIT - very usefull IDE (supports Perl, Java, PHP, HTML etc.). You can configure it easy for run Perl script.
- AbsolutePerl - very power Perl IDE, but it has Russian interface (unfortunately :-((( )
--------------------------------
SV* sv_bless(SV* sv, HV* stash);
| [reply] |