Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Hate Mondays

by projekt21 (Friar)
on Aug 01, 2003 at 16:49 UTC ( [id://280041]=note: print w/replies, xml ) Need Help??


in reply to Hate Mondays

I don't want to be a spoil sport -- but as today is Friday -- how about:

perl -e 'print "Friday rulez\n" if (localtime)[6] == 5;'

alex pleiner <alex@zeitform.de>
zeitform Internet Dienste

Replies are listed 'Best First'.
Re: Re: Hate Mondays
by hash (Scribe) on Aug 01, 2003 at 17:22 UTC
    #!/usr/bin/perl my @days = ("Su", "Mo", "Tu", "We", "Th", "Fr", "Sa") ; foreach (@days) { if ($_=~/Fr/) { print "Friday OWNZ!\n" } else { print "$_\n" ; } }
      #!/usr/bin/perl use LWP::Simple; my $source = get("http://www.time.com/time/"); my ($first) = ($source =~ /<!--([^<>]+)-->/); print "Friday rocks!\n" if $first =~ /\bFri\b/;

      alex pleiner <alex@zeitform.de>
      zeitform Internet Dienste

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://280041]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2024-04-18 06:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found