ITmajor has asked for the wisdom of the Perl Monks concerning the following question:
$start_date = $start_year, $start_month, $start_day; $end_date = $end_year, $end_month, $end_day; For ($filename = $start_date, $name; $start_date <= $end_date; $start_date->add(days=>1))[ open(FILE, ¡¥<$filename.txt¡¨); # Files look like this ----> 080518_name.txt #do stuff w/file #continue until last file in date span }I'm having trouble formatting the dates to look just like this "080623" without spaces, symbols or date/time. How can I do this? How do I set the date to increase the day (and month and year as necessary)?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using a range of dates in yymmdd format
by mr_mischief (Monsignor) on Aug 13, 2008 at 17:06 UTC | |
by ITmajor (Beadle) on Aug 14, 2008 at 15:23 UTC | |
by mr_mischief (Monsignor) on Aug 14, 2008 at 17:18 UTC | |
by Cristoforo (Curate) on Aug 15, 2008 at 15:44 UTC | |
Re: Using a range of dates in yymmdd format
by ikegami (Patriarch) on Aug 13, 2008 at 17:10 UTC | |
by hawtin (Prior) on Aug 14, 2008 at 09:56 UTC | |
Re: Using a range of dates in yymmdd format
by Cristoforo (Curate) on Aug 14, 2008 at 20:10 UTC | |
Re: Using a range of dates in yymmdd format
by Krambambuli (Curate) on Aug 14, 2008 at 13:49 UTC |