in reply to How do i get "the last day of last month"?

Here is one way (using today's last month but you could set it otherwise):
use Date::Calc qw( Today Days_in_Month Day_of_Week Day_of_Week_to_Text Add_Delta_YM ); my ( $year, $month, $date ) = Today(); ( $year, $month, $date ) = Add_Delta_YM( $year, $month, $date, 0, -1 ); my $day = ( Days_in_Month($year,$month) )[-1]; print $day, "\n"; print Day_of_Week_to_Text( Day_of_Week($year,$month,$day) ), "\n";
Additions above (I realized you might mean day of week and not date)!

Update 2: D'oh! Re-corrected version to get last month's is now above.