#!/usr/bin/perl -w use strict; use LWP::Simple; use Win32::API; my ( $day, $month, $year ) = (localtime)[3..5]; my $date = sprintf( "%4s%02s%02s", $year += 1900, ++$month, $day ); my $filename = 'c:\perl\penny-arcade.gif'; print "Fetching: http://www.penny-arcade.com/images/$year/${date}h.gif\n"; #my $gif = get( "http://www.penny-arcade.com/images/$year/${date}h.gif" ); my $gif = get( "http://www.penny-arcade.com/images/2001/20011031h.gif" ); die "Could not retrieve GIF: $!" unless defined $gif; open GIF, ">$filename" or die "Can't open $filename: $!"; binmode GIF; print GIF $gif; close GIF; my $SysParam = new Win32::API( 'User32', 'SystemParametersInfo', 'NNPN', 'N' ); die "Can't import API SystemParametersInfo: $!" unless defined $SysParam; $SysParam->Call( 20, 0, $filename, \x1 );