Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing FORTRAN programs within PERL

Status
Not open for further replies.

nittmann

Technical User
Dec 9, 2002
2
US
Hi,

I decided to learn PERL recently and the first thing I would like to do is to execute a couple of FORTRAN programs in PERL, unfortunately the PERL book I bought does not provide a quick insight into how to do this.

What I want to do!

execute prog_1 ...which creates a file fort.1 which I want
to use in prog_2 and which I call as argument with Prog_2

hence I wrote

$command1="prog_1";
$command2="prog_2 fort.1";
system($command1);
system($command2);

However the result is that prog_2 does not recognize fort.1





 
Does it work ok if you run it from the command line? If so, maybe you should post your question in the perl forum. CaKiwi
 
Thank you for you suggestion. In fact I continued working
on this issue yesterday and I resolved it by trying various things including what you suggested.

My PERL statements were actually correct - however I made
a mistake in the output file name - hence PERL did not recognize the file I wanted it to recognize.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top