in reply to Getting yesterday's date, and random dates in the past

Date::Calc for date calculations!

use Date::Calc 'Add_Delta_Days'; sub get_yesterday { my ( $year, $month, $day ) = split /-/, shift; return join '-', Add_Delta_Days( $year, $month, $day, -1 ); }