in reply to How do i find yesterday's date

You can use DateTime for this
use DateTime; my $dt = DateTime->now()->subtract( days => 1 );