in reply to FTP and get file date manipulation problem

i would like to know the best method for handling end of the month conditions

I would look at Date::Calc on CPAN for dealing with date math. (there is probably something in DateTime as well, but as of yet i am not familiar with those modules). Here is some code to work off of:

use strict; use warnings; use Date::Calc qw/Add_Delta_Days/; my ($mday,$mon,$year) = (localtime)[3..5]; my ($new_year,$new_month,$new_day) = Add_Delta_Days($year + 1900,$mon+ +1,$mday,-1); my $file_name = sprintf("%04d%02d%02d.dat", $new_year,$new_month,$new_ +day); print "Getting $file_name\n";
Anyhow take a look at the Date::Calc documentation.

-enlil