请教下面的perl程序是什么意思

来源:百度知道 编辑:UC知道 时间:2024/09/25 05:42:51
#! /usr/bin/perl -w

#Drives combine_output*.f90 to combine all variables _after_ the end_day has been done.
#Runs _inside_ dir 'outputs'.
#Make sure the executible is comptaible with the system.

if(@ARGV != 2)
{
print "$0 <start stack # w/o leading 0s> <end stack #> \n";
exit(1);
}
$start_day=$ARGV[0]; $end_day=$ARGV[1];

# Echo inputs
print "$0 $start_day $end_day\n";

$code="/home/users/yinglong/SELFE/combine_output4_amb6403";
@vars=('elev.61','hvel.64','pres.61','airt.61','shum.61','srad.61','flsu.61','fllu.61','radu.61','radd.61','flux.61','evap.61','prcp.61','wind.62','wist.62','dahv.62','vert.63','temp.63','salt.63','conc.63','tdff.63','vdff.63','

打印文件名及输入的第一第二个参数
后面(-e "$start_day\_0000_$var")不是用perl写的 至少不是perl常用语法,应该是shell一类底层语言.
反正是写文件操作

你要一行一行说么???那很难的。。

入口有两个参数 之后一个一个读文件

晕~ (-e "$start_day\_0000_$var") 是标准的perl语法
-e 用来判断文件或目录是否存在。