Women in Technology

Hear us Roar



Article:
  VBScript or Perl?
Subject:   perl does NOT need instalation for windows
Date:   2006-05-05 19:07:30
From:   evenprime
* Requires installation


This suggests perl needs to be installed on any machine a perl script needs to run on. Not so.


Easiest way around this is to install Activestate perl on ONE machine with all your favorite 3rd party modules and copy the "c:\perl" folder to a shared network location and call your scripts from a oneliner batch file like so.



\\server\perl\bin\perl.exe \\server\scripts\myscript.pl



or wrap it in a batch file like this:



@echo off
\\server\perl\bin\perl.exe -x %0 %*


:: the above command tells the perl interpreter to
:: strip off text before #!perl line and treat everything
:: afterward like a perl script!

goto endofperl


#!perl


print "this rocks, this portable script will \n";
print "run on any machine in the network. \n";
print "No perl install required on target machine \n";


__END__
:endofperl



Also, their are many ways to compile scripts into exe's for users and make mini-perl interpreters (like a 2 meg perl.exe interpreter) so you can send open-source scripts to other admins to edit/plagiarize. No need to install 50+ megs of perl on any machine + modules unless you are developing.


MSH thoughts:
MSH was supposed to be the bomb, but it's still in beta, needs to be installed on any machine it needs to run on (no friendly copying of "C:\Program Files\Microsoft Command Shell" to a network share), needs .NET 2.0 installed, only runs on XP/2003 and up (no NT/2000) and doesn’t look like it will make it into Vista.


MSH won't be common enough on platforms to be generally considered useful till post 2010.


And since msh is more of a language than a shell (a shell that glues small apps with switches together) we can look forward to all sorts of fun problems like what version we have and backwards compatibility issues... problems languages cause. (perl gets around this by having one installation point on the network)


Their was a perl based shell called PSH that is a lot like MSH. It allowed you to interactively load modules and do awesome stuff from the command line,(Python and Ruby can do this too), but neat as it was, it was never really useful...So much easier to make a quick 3-4 liner in your favorite IDE and launch it from their. (what's REALLY needed is a better IDE that has a embedded shell for output)


So, it's neat to iterate over files in an object oriented, interactive programming environment (MS's new shell) but the reality is, it's just not that useful and will have a limited audience.