From d2f1c7b816638ef87c6ce3450e9f293ad234e9c5 Mon Sep 17 00:00:00 2001 From: in2 Date: Fri, 20 Sep 2002 15:04:04 +0000 Subject: *** empty log message *** git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@526 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/lunar-1,15run.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 util/lunar-1,15run.pl diff --git a/util/lunar-1,15run.pl b/util/lunar-1,15run.pl new file mode 100644 index 00000000..52ea8cea --- /dev/null +++ b/util/lunar-1,15run.pl @@ -0,0 +1,10 @@ +#!/usr/bin/perl +use LocalVars; +# 每農曆初一, 十五就會跑一次 $ARGV[0] +# 資料來源 http://tw.weathers.yahoo.com/ +open FH, "$LYNX -source http://tw.weathers.yahoo.com/ | grep '民國'|"; +$din = ; +close FH; + +($month, $day) = $din =~ /農曆 (.*?)月 (.*?)日/; +system($ARGV[0]) if( $day eq '一' || $day eq '十五' ); -- cgit v1.2.3