use LWP::UserAgent; { print "\n Fetching log...\n\n"; my $yesterday = Yesterday(); my @msg = Main( 'joe@modem.com', # remote domain 'yosef', # remote id 'secret', # remote password "access.log.$yesterday", # remote logfile input 'c:/logs', # local dir to write to 'access.log', # local logfile output ); print "$_\n" for(@msg); } #### { local $\="\n"; print "\n Fetching log...\n"; print for Main( 'joe@modem.com', # remote domain 'yosef', # remote id 'secret', # remote password "access.log.".Yesterday(), # remote logfile input 'c:/logs', # local dir to write to 'access.log', # local logfile output ); } #### sub Yesterday { sprintf "%04d-%02d-%02d", Add_Delta_Days(Today(),-1); }