In part of an automated build system, a client is building a product that builds in the last release on a windows system. We have set up a new system for the next release.
Running under an MKS korn shell, and after the clients code is fetched a client's perl script runs to start compiles, (oversimplified).
Within the perl script a back ticked system call is made. The shell script being called doesn't have an extension. Within MKS you can set HASHBANG=1 so it will use the #! entry at the top. This is set in the environment.

It appears the perl script's back ticked system call is running cmd instead of the parent shell, mks's sh, or the environment isn't inherited, so the #! isn't recognized.

Is there a way to tell perl or does perl recognized the SHELL environment variable, (yes, it is defined), to know what shell will be used or is it more likely my environment isn't being passed to the system call?

This worked in the previous release and I can't figure out what is different between the two.

Humbly awaiting guidance or lashing,
Novitiatus

In reply to Is it my ENV within my system call or the shell itself? by Novitiatus

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.