Deplication

Simpler is better.

Wednesday, 26 June 2013

Yesterday Perl script

A quick script to display yesterday's date in a specified date format:

#!/bin/perl -w

use strict;
use POSIX qw(strftime);
use Time::Local;

{
   my $yesterday=time() - (24 * 60 * 60);
   print strftime("%d%m%Y", localtime($yesterday));
}

Posted by Craig Watcham at 08:33
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: perl
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Disclaimer

I work for Amazon Web Services. This blog represents my own opinions and not those of my employer.

Blog Archive

  • ►  2021 (2)
    • ►  August (1)
    • ►  July (1)
  • ►  2019 (2)
    • ►  September (1)
    • ►  February (1)
  • ►  2018 (3)
    • ►  October (1)
    • ►  August (1)
    • ►  May (1)
  • ►  2017 (2)
    • ►  November (1)
    • ►  August (1)
  • ►  2016 (7)
    • ►  October (1)
    • ►  August (2)
    • ►  June (1)
    • ►  May (2)
    • ►  February (1)
  • ►  2015 (3)
    • ►  July (1)
    • ►  June (1)
    • ►  January (1)
  • ►  2014 (12)
    • ►  October (1)
    • ►  September (3)
    • ►  August (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
    • ►  February (1)
    • ►  January (1)
  • ▼  2013 (9)
    • ►  December (1)
    • ►  November (4)
    • ►  August (1)
    • ▼  June (1)
      • Yesterday Perl script
    • ►  May (1)
    • ►  March (1)
  • ►  2012 (5)
    • ►  July (1)
    • ►  June (2)
    • ►  April (1)
    • ►  January (1)
  • ►  2011 (9)
    • ►  September (2)
    • ►  July (7)

Search This Blog

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments
Simple theme. Theme images by gaffera. Powered by Blogger.