Hello lpl,

Since you did not post any sample code, or parameters I can only assume what you are trying to achieve or what you have already attempted.

I checked Google and I found this:

In bash, etc, source is a builtin that means read this file, and interpret it locally (a little like a #include). In this context that makes no sense - you either need to remove source from the command and have a shebang (#!) line at the start of the shell script that tells the system which shell to use to execute that script, or you need to explicitly tell system which shell to use, e.g. system "/bin/sh", "/some/generic/script"; "with no comment about whether it's actually appropriate to use system in this case".

Source of the answer (How to run “source” command (Linux) from a perl script?).

I would also recommend to read (How to "source" a shell file in Perl?) it contains some nice answers to similar question and also (Perl system calls in csh Not executing!).

My question here is also, why to combine both? Is there something that you are trying to do and it can not be done in Perl? Provide us some examples, description of what you are trying to achieve and sample code.

Hope this helps.

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re: sourcing the csh script issue by thanos1983
in thread sourcing the csh script issue by lpl

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.