perl script does not work.
Hi
i should run a perl script. However, during runing it, an error titled "sh: 1: trav: not found " will be appeared. trav is an executed fortran in a part of whole script posted. I am not familiar with perl and do not know why it does not work.is there anyone to help me? running the script is extremely important for me.
# calculate arrival time for P and S
open(TRAV,"| trav > junk.p") or die "couldn't run trav\n";
printf TRAV "%d %d %d\n", $num_layer,$src_layer,$rcv_layer;
for ($j=0;$j<$num_layer;$j++) {
printf TRAV "%11.4f %11.4f\n",$th[$j],$vp[$j];
}
printf TRAV "%d\n",$#dist + 1;
foreach (@dist) {
printf TRAV "%10.4f\n",$_*$deg2km;
}
close(TRAV);
open(TRAV,"| trav > junk.s") or die "couldn't run trav\n";
printf TRAV "%d %d %d\n", $num_layer,$src_layer,$rcv_layer;
for ($j=0;$j<$num_layer;$j++) {
printf TRAV "%11.4f %11.4f\n",$th[$j],$vs[$j];
}
printf TRAV "%d\n",$#dist + 1;
|