in reply to Anyone know how to get cmd line perl?
The first line tells Windows to consider .pl an executable extension like .exe, .bat, and so on. (In fact if you look at the value of the pathext environment variable before modifying it you'll see precisely those extensions and a few more.)
The second line makes sure that the .pl extension is associated with perl (which it probably already is if you're using ActiveState).
The perl interpreter itself respects command-line arguments used in shebangs, so you can put a statement like this at the beginning of your script:
#!perl -w
if you want to enable warnings or set other switches.
Note that this technique does not work on Windows 95-derived OSes including Windows 98 or ME. I'm not aware of any workaround (though maybe using Cygwin to emulate a more Unix-like system would work?).
|
|---|