#!/usr/bin/perl use strict; use warnings; use LWP::Simple; use POSIX 'strftime'; my $wait=60*60*24; my $url='http://www.test.d/table.html'; my $name='/path/to/dir/table-%y-%m-%d.html'; while(1) { eval { $SIG{ALRM}=sub{ die(); }; alarm($wait); my $c=; chomp($c); alarm(0); exit if(defined($c) && $c eq 'q'); } my $file=strftime($name); print "Save $url => $file\n"; getstore($url, $file) or die("ERROR store $file ($!)"); }