in reply to Perl Scripts on systems without perl environments.

Rewrite the script in another language that would be available on those systems. That would be my first suggestion. You can inflate the price seeing as you wrote the script expecting one set of circumstances that is now politically infeasible, hence you have to start over.

An alternative would be write a main() in C that embeds the Perl interpreter, hard-code the Perl script as a string, then call the C-equivalent of Perl's eval on it. That would be studly. :-) Of course, you'd need access to one of their machines for development purposes and a compiler for each environment ... Good luck?


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re: Perl Scripts on systems without perl environments.

Replies are listed 'Best First'.
Re^2: Perl Scripts on systems without perl environments.
by SkipHuffman (Monk) on Nov 07, 2005 at 17:16 UTC

    Well, that was my plan by using Perl. The other obvious option is Rexx, but that would require a politically difficult installaiton on the Windows machine.

    I am really trying to avoid writing the same little application twice in two different scripting languages. I would rather not maintain multiple versions.

    Thanks

    Skip
Re^2: Perl Scripts on systems without perl environments.
by t'mo (Pilgrim) on Nov 07, 2005 at 18:24 UTC

    Even better: write a program that will translate the algorithm in your current script into several target languages, one being Perl, and the other being the language that is available on that system. Just as studly (or even moreso) as embedding the Perl interpreter, without having to touch C (unless, of course, that's the other target language).

      oooo! Fancy. Now I have THREE things to maintain. (The converter, the windows version, and the os/2 version.) I am trying to simplify a problem here.

      Seriously though, sometime a couple of years from now, somebody is going to have to figure out what I did here and make it work with whatever new conditions have come up. I don't want to make their job more difficult than absolutely necessary.

      Skip