Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Two operating systems.

by rgb96 (Acolyte)
on Feb 16, 2009 at 16:57 UTC ( #744134=perlquestion: print w/replies, xml ) Need Help??

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

I am pretty new to perl, and I have run into a wall. The program my supervisors want me to write is basically a glue program to provide 1 gui to run several different programs we run for testing. Easy enough, until I realized that the two most important programs are not being nice. With the builds we have, one program is only compatible with Windows, while the other is only compatible with Linux. My original though was to create a virtual machine to run windows and find a perl module to access it and start the program, however, I have had no luck in finding such a module. Any ideas on a way to do this?

Replies are listed 'Best First'.
Re: Two operating systems.
by Corion (Patriarch) on Feb 16, 2009 at 17:02 UTC

    You can easily install Perl within the virtual machine and have it request jobs from the outside, for example via http. Or you can run an ssh server in the virtual machine and then run commands inside the virtual machine by using one of the SSH clients that can be automated by Perl.

      good ideas. I think that's what I'll do.
Re: Two operating systems.
by wol (Hermit) on Feb 16, 2009 at 17:42 UTC
    Don't forget the non-Perl option: go back to your supervisor and tell them very briefly why it's difficult (but not impossible) and see if they still want you to do it!

    They may rather allocate you something else to do if the benefit is only modest, and the cost is greater than they first thought. Or they may not. Either way, you should get brownie points for raising this in all but the most disfunctional of organisations.

    use JAPH;
    print JAPH::asString();

Re: Two operating systems.
by samtregar (Abbot) on Feb 16, 2009 at 18:15 UTC
    I wrote an article about doing something similar with Perl and VMWare (which has a Perl API) to build a test farm for the Krang project. Check it out here, might give you some ideas:

    Another option to consider is Wine - you could potentially run your Windows program in an emulated environment. I've seen that work successfully to run a Windows-only geo-coder under Linux.


      I had thought about WINE, but WINE doesn't seem to support it, which doesn't surprise me. Thanks for the suggestions, I'll check out that link.
Re: Two operating systems.
by ysth (Canon) on Feb 17, 2009 at 04:25 UTC
Re: Two operating systems.
by misterwhipple (Monk) on Feb 17, 2009 at 17:06 UTC
    I have had good results using the Expect module to control a program via a Telnet connection.

    It's not entirely intuitive. The book Exploring Expect (O'Reilly, 1994), which is about the TCL program that inspired the Perl module, helped me.

    cat >~/.sig </dev/interesting

      Wow, I loved that book. I started out as a TCL programmer and that book totally rocked my world. That and Mastering Regular Expressions.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://744134]
Approved by Corion
Front-paged by Arunbear
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2022-06-26 16:53 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (86 votes). Check out past polls.