Perl Help - Windows Perl script accessing a Unix perl Script

Discussion in 'Perl' started by dpackwood, Sep 29, 2003.

  1. dpackwood

    dpackwood Guest

    Hello,

    I have two different scripts that do pretty much the same thing. The main
    perl script is on Windows. It runs and in the middle of it, it then calls
    out another perl script that then should run on a Unix box I have. Both
    scripts run ok, except for the part when Windows try's to call out the
    Unix script. I have it set up where the Unix is mapped through a drive
    letter and can drop stuff into the Unix box. It is going through another
    server to do that. So I can see the script and drop files into the Unix box
    but just can't figure out why perl will not call out the script. When I call
    out the perl script through the command line of windows I get " specified
    path not found", even though I'm in that directory.

    Has any one done anything like this that would be willing to either help me
    or point me in the right direction to do research on it. Thanks

    -Dale
    dpackwood, Sep 29, 2003
    #1
    1. Advertising

  2. On Mon, 29 Sep 2003 03:05:05 GMT
    "dpackwood" <> wrote:
    > I have two different scripts that do pretty much the same thing. The
    > main perl script is on Windows. It runs and in the middle of it, it
    > then calls out another perl script that then should run on a Unix
    > box I have. Both scripts run ok, except for the part when Windows
    > try's to call out the Unix script. I have it set up where the Unix
    > is mapped through a drive letter and can drop stuff into the Unix
    > box. It is going through another server to do that. So I can see the
    > script and drop files into the Unix box but just can't figure out
    > why perl will not call out the script. When I call out the perl
    > script through the command line of windows I get " specified path
    > not found", even though I'm in that directory.
    >
    > Has any one done anything like this that would be willing to either
    > help me or point me in the right direction to do research on it.
    > Thanks


    Code would be helpful :)

    So "pointers" to help you solve your own issue:
    1) #!/usr/bin/perl -w on the first line :)
    2) use strict on the second line :)
    3) use diagnostics on the third line :)

    HTH

    --
    Jim

    Copyright notice: all code written by the author in this post is
    released under the GPL. http://www.gnu.org/licenses/gpl.txt
    for more information.

    a fortune quote ...
    There is a green, multi-legged creature crawling on your
    shoulder.
    James Willmore, Sep 29, 2003
    #2
    1. Advertising

  3. dpackwood

    Jim Gibson Guest

    In article <BjNdb.7424$>,
    dpackwood <> wrote:

    > Hello,
    >
    > I have two different scripts that do pretty much the same thing. The main
    > perl script is on Windows. It runs and in the middle of it, it then calls
    > out another perl script that then should run on a Unix box I have. Both
    > scripts run ok, except for the part when Windows try's to call out the
    > Unix script. I have it set up where the Unix is mapped through a drive
    > letter and can drop stuff into the Unix box. It is going through another
    > server to do that. So I can see the script and drop files into the Unix box
    > but just can't figure out why perl will not call out the script. When I call
    > out the perl script through the command line of windows I get " specified
    > path not found", even though I'm in that directory.
    >
    > Has any one done anything like this that would be willing to either help me
    > or point me in the right direction to do research on it. Thanks
    >
    > -Dale
    >
    >


    What do you mean by "call out" (this is where posting code would help)?
    Are you trying to get the Unix box to execute its own script? For that,
    you need the equivalent of ssh or rsh or the like. If you are just
    calling the second script with backticks or the system call, the perl
    interpreter on the Windows machine will attempt to fork a subprocess to
    execute the script on the _Windows_ system. If the first line of the
    Unix script contains the path to the perl program on the Unix box and
    that path is different from the path to the Windows perl executable, as
    it is likely to be, you will get the message you are seeing.
    Jim Gibson, Sep 29, 2003
    #3
  4. dpackwood

    Dale Guest

    Thank you to everyone who replied. I think I have found the answer. If not I
    will let you know. Thanks again
    "dpackwood" <> wrote in message
    news:BjNdb.7424$...
    > Hello,
    >
    > I have two different scripts that do pretty much the same thing. The main
    > perl script is on Windows. It runs and in the middle of it, it then calls
    > out another perl script that then should run on a Unix box I have. Both
    > scripts run ok, except for the part when Windows try's to call out the
    > Unix script. I have it set up where the Unix is mapped through a drive
    > letter and can drop stuff into the Unix box. It is going through another
    > server to do that. So I can see the script and drop files into the Unix

    box
    > but just can't figure out why perl will not call out the script. When I

    call
    > out the perl script through the command line of windows I get " specified
    > path not found", even though I'm in that directory.
    >
    > Has any one done anything like this that would be willing to either help

    me
    > or point me in the right direction to do research on it. Thanks
    >
    > -Dale
    >
    >
    Dale, Sep 30, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    12
    Views:
    1,637
    Dave Thompson
    Jan 10, 2005
  2. Replies:
    18
    Views:
    618
    Dave Thompson
    Jan 10, 2005
  3. Darshan

    Accessing web through C/Perl in Unix

    Darshan, Jan 16, 2006, in forum: C Programming
    Replies:
    1
    Views:
    316
    Vladimir S. Oka
    Jan 16, 2006
  4. Robert Wallace

    my own perl "dos->unix"/"unix->dos"

    Robert Wallace, Jan 21, 2004, in forum: Perl Misc
    Replies:
    7
    Views:
    276
    Michele Dondi
    Jan 22, 2004
  5. John Ramsden

    Accessing Windows WMI Info from Unix

    John Ramsden, May 11, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    130
    John Ramsden
    May 11, 2004
Loading...

Share This Page