Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

What holiday is today? <!-- -->

by crazyinsomniac (Prior)
NODE.owner = 10277 N.title = monktitlebar sitedoclet N.owner = 17342 -->
on Mar 17, 2002 at 11:02 UTC ( #152305=snippet: print w/replies, xml ) Need Help??
Description: So you're wondering what holiday is today (of the major ones), and all you've got is a terminal and perl.
#!/usr/bin/perl -w
use strict;
use LWP::Simple qw/ get /;
use HTML::TokeParser;
my $html = get('');
my $p = HTML::TokeParser->new(\$html);
my $t = $p->get_tag('img');
die $t->[1]->{alt};

#the one liner version
perl -MLWP::Simple -MHTML::TokeParser -e"die HTML::TokeParser->new(\(g

perl -MLWP::Simple -MHTML::TokeParser -e'die HTML::TokeParser->new(\(g
Replies are listed 'Best First'.
Re: What holiday is today? !-- --
by gellyfish (Monsignor) on Mar 17, 2002 at 16:26 UTC

    Luvverly, However for everyday use one might want to consider Date::Calc ;-}


Re: What holiday is today? !-- --
by theguvnor (Chaplain) on Mar 17, 2002 at 17:06 UTC

    Cool - I set my .bashrc file to call this script upon startup!


Re: What holiday is today? !-- --
by erikharrison (Deacon) on Mar 17, 2002 at 16:01 UTC

    Now, that's just plain nifty.

      ehhhhhhhhhhhhhhhhhhhhhhhhh nifty? spiffy!
Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: snippet [id://152305]
[robby_dobby]: Corion: Nice, you just won't be around to deal with the mess - enjoy your vacation :-)
[robby_dobby]: marto: Sure, will do. Thanks!
[Corion]: marto: No great plans - I'll meet with my sister, my brother and my mother, but that's all :)
[Corion]: ... and also a visit to my godson+family of course :)
Corion orders some gifts online :)
[ambrus]: We're spending Christmas and the week after at my brother's place. First time ever, because the last four years they could came home instead.
[ambrus]: robby_dobby: wait what? Glasgow? isn't that one of the most boring towns ever?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-12-15 10:41 GMT
NODE.owner = 10277 N.title = Sections sitedoclet N.owner = 17342 -->
NODE.owner = 10277 N.title = Information sitedoclet N.owner = 17342 -->
Find Nodes?
NODE.owner = 10277 N.title = Find Nodes sitedoclet N.owner = 17342 -->
    NODE.owner = 10277 N.title = Leftovers sitedoclet N.owner = 17342 -->
    Voting Booth?
    What programming language do you hate the most?

    Results (431 votes). Check out past polls.