Hello Tyler,

A return value of 0 from a system call means that it ran successfully.  Any
other value means something went wrong.  For example, this script:

  #!/usr/bin/perl -w
  use strict;
  my $system;
  $system = system("echo Hello, World");
  print $system . "\n";
  $system = system("grok Hello, World");
  print $system . "\n";

will print this:

  Hello, World
  0
  Can't exec "grok": ...
  -1

What kind of file is bin2ascRunScript.bat?  If it is executable (using
chmod u+x), then system("./bin2ascRunScript.bat") should work.  If it is a
shell script, system("source bin2ascRunScript.bat") should work.  However,
if it is not a shell script, then system("source bin2ascRunScript.bat")
will not work.

HTH,
- Robert

At 04:14 PM 9/12/2001 -0600, Tyler Cruickshank wrote:
>Hello.  I am trying to use the system command to run a FORTRAN program on
my Solaris 5.7 system.  In the code pasted below the following system call:
system("chmod 777
/trinidad/uamaero/inputConversions/Bin2Ascii/bin2asciiInputFile.in");
works just fine.  When I actually try to run my FORTRAN program with a
"source" or a "./" my $status returns 0.  It does not work.  Note I tried
it 2 different ways with the same negative result.
>
>Does anyone have an idea?  Thanks for your time.
>
>- Tyler Cruickshank


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to