Had earlier stated my problem : User gives an input to the perl program which next does some function in a fortran program & finally the output of the fortran program is passed on to the perl which finally conveys it to the user. Thanks to all responses due to which i got an approx solution to the problem as given under :
##perl program## #!/usr/bin/perl use strict; use warnings; my($USAGE) = "$0 TEST\n\n"; unless(@ARGV) { print $USAGE; exit; } my($x) = $ARGV[0]; my($y) = $ARGV[1]; my $outputfile = "outputfile"; open(OUTFILE,">$outputfile"); print OUTFILE "$x\n$y"; my $res = system("./a.out"); my $resultfile = "fort.2"; open(RESULTFILE,$resultfile); my $z = <RESULTFILE>; print "\n$z\n"; exit; ##fortran77 program## OPEN(UNIT=1, FILE='outputfile', STATUS='OLD') READ(1,*) X,Y Z = X + Y OPEN(UNIT=2) WRITE(2,*) Z END My program is running fine. But i have a small query in order to improve my program. I want to pass the user input values to the fortran77 in command line itself without using any files as intermediate. Can you please guide the changes i need to do in the program both of perl & fortran & the exact compilation statement combining both the programs. Kindly suggest. Waiting for an early response..Thanking you.. __________________________________________________________ Free antispam, antivirus and 1GB to save all your messages Only in Yahoo! Mail: http://in.mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>