文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>perl时间函数的运用localtime

perl时间函数的运用localtime

时间:2010-05-25  来源:openkore

#!/usr/bin/perl


use strict;
my ($sec,$min,$hour,$mday,$mon,$year_off,$wday,$yday,$isdat) = localtime;
my $content = `ping 192.168.1.1 -n 5`;
my $mytime = scalar (localtime);
my $year = $year_off + 1900;
print $mytime."\n";
$mon += 1;
$mytime = sprintf("%04s%02s%02s%02s%02s%02s",$year,$mon,$mday,$hour,$min,$sec);
print $mytime."\n";
open FILE,">>D\:\\ping$mytime\.txt";
print FILE $content;
close FILE;


相关阅读 更多 +
排行榜 更多 +
flomo浮墨笔记 4.7.2

flomo浮墨笔记 4.7.2

生活实用 下载
问鼎

问鼎

系统软件 下载
杨浦书界 1.54

杨浦书界 1.54

生活实用 下载