Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Others have pointed out the various options. As someone else said, the two main options are ActiveState and cygwin. What I'd like to point out are the reasons you might choose one over the other.

The ActiveState Perl has all sorts of convenient stuff that makes using Perl on _Windows_ easier or better or whatever. Someone pointed out the association stuff (so you can double-click a Perl script and run it), but there's also some other stuff, not least of all a bunch of Win32:: modules. Oh, and it's got the documentation as HTML, in case you don't like fiddling with the commandline doc utilities. (A lot of Windows people don't. Since you've been using Perl on Unix, you probably don't mind that.) For installing modules, it comes with something called PPM (Perl Package Manager), which retrieves precompiled modules from ActiveState's repository and installs them. A lot of CPAN modules are not available, but installing modules is fast (because you don't need to compile them) and you don't have to worry that one might not be compatible and will break on Windows.

The reasons to choose the Cygwin offering are different, and have more to do with creating an environment that is similar to a Unix box. (It's especially similar to Linux.) Cygwin comes with a gcc and make and whatnot and a POSIX emulation layer, so it is possible to get CPAN.pm working and install modules from CPAN. You get the usual Unix commandline tools, so if your scripts are fond of using backticks, they're less likely to break than on ActiveState. You get vim and Emacs, so if you're used to editing the scripts on the Unix box, you've got a familiar editor. (vim and Emacs are of course also available separately for Windows.) The POSIX emulation layer means you can use the same shebang line (#!/usr/bin/perl or whatever) as on the Unix system, so you can transfer scripts back and forth and run them unchanged. (Then again, with the ActiveState association mechanism the shebang line doesn't actually matter (unless you're doing CGI; Apache seems to require it), so you can still run them unchanged anyway.)

I started using Perl with ActiveState Perl. Later I got cygwin because I wanted bash and stuff, and these days I'm using Linux. I'd say, if all you want is to run Perl on Windows, go with the ActiveState distribution, but if what you want is a Unix-like environment, that's what Cygwin is for. Both are good at what they do, and if you write reasonably portable Perl it'll run pretty much unchanged in either environment.

If you use lots of system-specific stuff, like launching external processes and so on, then of course there are differences. ActiveState Perl is better for using OLE to talk to MS Word, but the cygwin distribution is better if you want to

open PING, "ping $addy | grep $re |";
and read from it, or something like that. If you don't do either of those things, you might be in the "I write portable Perl so it doesn't matter" category, in which case either distribution will do just fine.


for(unpack("C*",'GGGG?GGGG?O__\?WccW?{GCw?Wcc{?Wcc~?Wcc{?~cc' .'W?')){$j=$_-63;++$a;for$p(0..7){$h[$p][$a]=$j%2;$j/=2}}for$ p(0..7){for$a(1..45){$_=($h[$p-1][$a])?'#':' ';print}print$/}

In reply to Re: A Perl Environment by jonadab
in thread A Perl Environment by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-24 19:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found