当前位置: 首页 > 工具软件 > Perl > 使用案例 >

perl里调用perl,并传入参数

商开宇
2023-12-01

#!/usr/bin/perl

 

#require "gettime.pl";

print "************************call gettime.pl begin************************ \n";

 

my $rep = "SELECT HXJYLSH,ZJYLSH,BCXH,JYRQ,JYRQ FROM EASTBS.JYLS WHERE ETDM.CHK_DATE(JYRQ)=0 and JYRQ='##'";

$rep=~ s/##/20160601/;

 

print "$rep \n";

for my $i(0..8){

my $ret=`perl gettime.pl $i`;

print "$ret";

}

 

print "************************call gettime.pl end ************************ \n";

print " myself ok \n";

 

 

 

#!/usr/bin/perl

my $params = $ARGV[0]; #传入的参数

print "get param $params \n";

print "gettime is 2011-07-25 14:40:10\n";

 类似资料: