奇科電腦 回奇科電腦首頁奇科電腦LPI課程資訊奇科電腦Embedded課程資訊奇科電腦Cisco課程資訊奇科電腦Programming課程資訊奇科電腦Smartphone App課程資訊
Tech Tips20  How to deal with Fortran data files and run Fortran program in Perl.

Author: Ben|Date: 2009/07/10|Back to Tech Tips

#!/usr/bin/perl

use File::Copy;

for( 1 .. 9 )
{
copy( "test_$_.dat", "input_ini.dat" ) or die "Can't copy file test_$_\n";
system( "./run.F90" );

if ( -d "result_$_" )
{
move("result.dat", "result_$_/result.dat" );
}
else
{
mkdir( "result_$_" );
move("result.dat", "result_$_/result.dat" );
}
}


Best Browse: 1024x768 Copyright 2010 GeeGo Systems, Ltd.
service@geego.com.tw|DL: 0800-296-296|3F., No.60, Zhulun St., Zhongshan Dist., Taipei City 104, Taiwan (R.O.C.)|02-2711-6373