Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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

by crazyinsomniac (Prior)
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
Comment on What holiday is today? <!-- -->
Download Code
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!

Back to Snippets Section

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: snippet [id://152305]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2016-02-11 01:46 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (358 votes), past polls