Perl in Windows cannot fork(). I rarely use windows, and am a linux advocate, but Windows does allow a pseudo fork by creating a thread. The fork command will work on Window's versions of Perl, but there is hidden OS-specific magic.
The differences which I hassle with the most, is the line endings are different, requiring frequent dos2unix or unix2dos conversions. There is no easy to use IPC on pipes in Windows, so frequently used modules on linux, need special Win32 modules, like IPC::Run instead of the standard IPC::Open3. Also, Windows is done within the confines of a graphical GUI, wheras on linux, there is a true console, so you need to run wperl to suppress windows from opening. Finally, and the BIGGEST problem, there is the hassle of getting precompiled modules for the various versions of win32. Since you don't get an easy to use or install compiler with Windows, you need to rely on others to make many of the modules for you, and often they are hard to find.
Wheras on Linux, the instructions to build modules generally work flawlessly.
To be honest, Perl was designed to run on Linux and Unix platforms, and if
you want the most satisfaction from Perl, run it on Linux. Ubuntu is easy and the most Windows-like.... but I prefer Slackware, as it still adheres to the original simple unix style. But if you can't afford 100 hours to learn basic unix, then Ubuntu is great...it has the apt-get program to get you automatic updates, will connect to wireless access points automatically, and is supported for 5 years on each new release.
| [reply] |
Since you don't get an easy to use or install compiler with Windows
You are mistaken. There are *three* easy way to install a compiler.
- Strawberry Perl comes with a compiler.
- ActivePerl's cpan will automatically install a compiler if needed.
- You can install MS's compiler for free. It's a one-click install.
Finally, and the BIGGEST problem, there is the hassle of getting precompiled modules for the various versions of win32.
Quite the opposite, it's a great plus that you don't need to compile most modules yourself.
| [reply] [d/l] |
There's also cygwin, which gives you a complete GNU-like environment on Windows, where you can install Perl, bash, gcc, make and all the other familiar tools from the GNU world and easily install CPAN modules and run shell scripts.
People keep calling me names every time i say that, but i find the cygwin experience much more stable and predictable than ActiveState or Strawberry. Simply put, CPAN module installation fails much more often on these platforms than on cygwin.
| [reply] |
| [reply] |
| [reply] |
if you want the most satisfaction from Perl, run it on Linux
However, if you're working in a Windows-centric environment, Perl can be useful for management tasks and for interacting with installed programs. Sure there are alternatives (DOS, VBscripts, power shell, etc.), but I often times I prefer Perl.
Anyways, I'm not trying to pick sides in the Windows vs. *nix debate of which is better. Just wanted to point out that Perl in a predominately Windows environment can still be very useful and provide a lot of satisfaction.
I think it's best to know how to use multiple tools and grab the one that you think is best for the job. That's my 2 cents.
Despite what I typed above, I do have to admit that there are a number of built-in Perl functions that whose name/syntax/functionality are more *nix-like, which I admit supports your argument that "Perl was designed to run on Linux and Unix platforms".
| [reply] |