文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
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;


相关阅读 更多 +
排行榜 更多 +
泡龙大闯关安卓版

泡龙大闯关安卓版

冒险解谜 下载
割草派对安卓版

割草派对安卓版

飞行射击 下载
堡垒攻防战安卓版

堡垒攻防战安卓版

飞行射击 下载