Created
January 20, 2012 07:34
-
-
Save yongbin/1646007 to your computer and use it in GitHub Desktop.
is_bizday
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use Web::Query; | |
| use DateTime; | |
| my $dt = DateTime->now; | |
| my $url = | |
| sprintf 'http://www.jacom.co.kr/cgi-pub/calendar/wwwcal.cgi?year=%d&month=%d', | |
| $dt->year, $dt->month; | |
| my $ret = 0; | |
| wq($url)->find("font[color='#ff0000']")->each( | |
| sub { | |
| my ( $i, $elm ) = @_; | |
| $ret = -1 if $elm->text eq $dt->day; | |
| } | |
| ); | |
| exit $ret; | |
| # usage: is_bizday && ./daily-report |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
unix-like script++