Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi every one... i am just faced by a very peculiar question.. "what is bad scripting with windows based perl?". I have never worked with perl on windows. I have alwayz worked with perl on unix. Thanks in advance. - yours perl bro
  • Comment on what is bad scripting in windows based perl

Replies are listed 'Best First'.
Re: what is bad scripting in windows based perl
by $code or die (Deacon) on Oct 10, 2001 at 05:04 UTC
    Apart from the things that might be considered "bad scripting" in any other flavor of perl, my pet hate are perl scripts that are "Windows Perl Scripts" when they needent be. (I.e. they use ActiveX components or command line tools unnecessarily, when a core perl module does the same thing and is more portable).

    Of course this can happen with any perl project and sometimes portability is not possible or it's not an issue. But I feel that portability is important if it's possible - you never know if you might need to run your script on another platform in the future. (But I am just as guilty as the next monk of writing platform specific code - I just try not to whenever possible)

    Simon Flack ($code or die)
    $,=reverse'"ro_';s,$,\$,;s,$,lc ref sub{},e;$,
    =~y'_"' ';eval"die";print $_,lc substr$@,0,3;
Re: what is bad scripting in windows based perl
by earthboundmisfit (Chaplain) on Oct 10, 2001 at 05:14 UTC
    The best facets of Perl work quite well on Windows. It's only when you start getting into the more escoteric vestiges of the language that you run into problems. Getting a process id, for example, is a breeze in Unix, but on Win32 platforms the same breeziness requires a module (Win32::Process).

    Thread emulation, sendmail, and taint mode are other common sources of angst.

    As tachyon points out, the docs are a good starting point. I've personally been rescued regarding specific issues on several occasions by the vast resources available with Super Search. If that fails, ask specific questions and provide code examples (use <CODE> tags). People here are very willing to help if you meet us half way and do a good job framing the question.

Re: what is bad scripting in windows based perl
by tachyon (Chancellor) on Oct 10, 2001 at 04:43 UTC

    I assume you want to know what is different on Windows. If so and you have installed Active Perl have a look at the HTML docs at (probably) c:\perl\html\index.html The section ActivePerl FAQ and more Particularly Windows Specifics is probably what you are looking for.

    Also Perl `backticks` and Norton Antivirus 2000 crashes my system with a BSOD. This is a recognised problem. Deactivate NAV2000 if this happens.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: what is bad scripting in windows based perl
by Flame (Deacon) on Oct 10, 2001 at 04:31 UTC
    Can you be a little more specific?


    "Wierd things happen, get used to it"

    Flame ~ Lead Programmer: GMS
    http://gms.uoe.org