Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Help - Windows Perl script accessing a Unix perl Script

Reply
Thread Tools

Perl Help - Windows Perl script accessing a Unix perl Script

 
 
dpackwood
Guest
Posts: n/a
 
      09-29-2003
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


 
Reply With Quote
 
 
 
 
James Willmore
Guest
Posts: n/a
 
      09-29-2003
On Mon, 29 Sep 2003 03:05:05 GMT
"dpackwood" <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
 
Jim Gibson
Guest
Posts: n/a
 
      09-29-2003
In article <BjNdb.7424$(E-Mail Removed). net>,
dpackwood <(E-Mail Removed)> 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.
 
Reply With Quote
 
Dale
Guest
Posts: n/a
 
      09-30-2003
Thank you to everyone who replied. I think I have found the answer. If not I
will let you know. Thanks again
"dpackwood" <(E-Mail Removed)> wrote in message
news:BjNdb.7424$(E-Mail Removed) ink.net...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing web through C/Perl in Unix Darshan C Programming 1 01-16-2006 02:15 PM
compile C programs with UNIX system calls (= Unix Programs??) jrefactors@hotmail.com C Programming 18 01-10-2005 03:35 AM
compile C programs with UNIX system calls (= Unix Programs??) jrefactors@hotmail.com C++ 12 01-10-2005 03:35 AM
Accessing Windows WMI Info from Unix John Ramsden Perl Misc 0 05-11-2004 01:46 PM
my own perl "dos->unix"/"unix->dos" Robert Wallace Perl Misc 7 01-22-2004 10:59 PM



Advertisments