in reply to week days in a given date range

Wow, Time::Piece is kind of cool.

At any rate, you want to do something like this:

C:\Temp>perl -MTime::Piece -e "$t = localtime; for(1..7){$anoDate = lo +caltime($t->epoch +($_*60*60*24)); print $anoDate->wdayname};" FriSatSunMonTueWedThu
You can make a hash that uses the day names as keys and stores the actual dates as arrays to group them the way you want. Instead of 1..x you want to know how many days there are between your start date and end date.

Update:Changed the - to a + in the code to count forward rather than backward.

Celebrate Intellectual Diversity