I've used windows scripting host a couple of times to super-charge some vbscript files. It's nice because you can mix and match languages in a single file. I've also used it to create windows components that you can register and later use with Win32::OLE or VBScript CreateObject() methods etc. It's nice, so long as you don't mind your scripts only being able to run on Win32.
Here's a small template .wsf that works on my system...
<Job ID="MyPerlWSH"> <script language=PerlScript> # Perl Script begins here use strict; use vars qw($WScript $WShell); $WScript->Echo("Hello World!"); # Perl Script ends here </script> </Job>
Your wsh files need to have a .wsf extension. You'll also notices that things like "print" won't work in a .wsf file, so you need to use $WScript->Echo()

Since you are running ActivePerl, you can have a look at the documentation for a bit more help. Look in the left-hand frame for "Windows Scripting".

Error: Keyboard not attached. Press F1 to continue.

In reply to Re: Perl and the Windows Scripting host by $code or die
in thread Perl and the Windows Scripting host by OzzyOsbourne

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.