Re: using perl to print yesterday's date, but with formatting options ?



Tom Van Overbeke wrote:

(snipped)

 perl -le 'print scalar localtime time - 86400'  which outputs:
Sun Oct 30 17:56:52 2005

But the format I need is: 30.10.05

#!perl

@Array = localtime(time - 86400);

print $Array[3], ".", $Array[4] + 1, ".", $Array[5] + 1900;


Purl Gurl

.