title: How do I get yesterday's date using localtime?
body: <p>How do I tweak this to get yesterday's date using localtime?</p>
  
  <pre><code>use strict;
  
  sub spGetCurrentDateTime;
  print spGetCurrentDateTime;
  
  sub spGetCurrentDateTime {
  my ($sec, $min, $hour, $mday, $mon, $year) = localtime();
  my @abbr = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );
  my $currentDateTime = sprintf "%s %02d %4d", $abbr[$mon], $mday, $year+1900; #Returns =&gt; 'Aug 17 2010' 
  return $currentDateTime;
  }
  </code></pre>
  
  <p>~</p>