I can't use any modules from CPAN, only those that come with one of the common Windows-oriented Perl distributions.

That's a bit like asking: "How can I get to the top of teh building when I've a broken leg and refuze to use the lift?"

I have to work in a very restricted environment where access to the internet is not allowed.

Can you carry in a flash drive? Or a CD/DVD? A floppy disk? At a pinch you could print the module(s) you need to paper at home, carry the paper in and type them in at work.

"how do I start a process in the background then kill it after a pre-defined amount of time?"

Ostensibly all you need is:

... my $pid = system 1, q[ c:\the\path\to\theProgram.exe /option1 /option2 + ]; sleep $timeout; kill 2, $pid; ...

But there are always complications. You'll want to capture the output; supply "user input'; click on pop-ups; and do it from a cgi script running in a VM hosted on a remote server in Timbuktu.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


In reply to Re: starting a process in the background, with a twist by BrowserUk
in thread starting a process in the background, with a twist by Anonymous Monk

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.