Why does perl's localtime seem to output the wrong month?

I've seen other answers, but they're not working for me for some reason. I'm trying to get yesterday's date in a Perl script using the following code. For future reference, today's date is Novemb...