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

Does somebody have any idea how I can run a Cshell script from within a Perl script. I have tried with the require command but this only allows me to run another Perl script from within a Perl script. Thanks. Pieter
  • Comment on How to run a cshell script from within a Perl script

Replies are listed 'Best First'.
Re: How to run a cshell script from within a Perl script
by davorg (Chancellor) on Feb 08, 2001 at 22:10 UTC

    That's not what require does at all.

    Depending on what exactly you want to do, you'll need one of system, exec or qx//. You should read the docs on these or search for them at this site.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

Re: How to run a cshell script from within a Perl script
by Caillte (Friar) on Feb 08, 2001 at 22:11 UTC

    HAve a look at the system command or backticks in perlfunc.

    For example:

    system("csh this_script.csh");

    $japh->{'Caillte'} = $me;
Re: How to run a cshell script from within a Perl script
by stefan k (Curate) on Feb 08, 2001 at 22:11 UTC
    Hi,
    it seems to me that you didn't want to read some manual, hm?
    Thus in order to have you actually learn something, I just point you to a current question in the Categorized Questions And Answers section.
    If I understand your question right, this should just answer it. If not, excuse me, but if it did, you should consider a little reading before asking The Monks.

    Regards
    Stefan K

    $dom = "skamphausen.de"; ## May The Open Source Be With You! $Mail = "mail@$dom; $Url = "http://www.$dom";
Re: How to run a cshell script from within a Perl script
by spaz (Pilgrim) on Feb 09, 2001 at 00:10 UTC
    The best way I can think of:
    rewrite it in perl!

    Seriously though, you'll learn a ton, and make the perl that you're writing that much more system independant (maybe)

    -- Dave