I would like to get this timestamps formatting:
01/13/2010 20:42:03 - -
$ perl -MPOSIX -we 'print POSIX::strftime("%m/%d/%Y %H:%M:%S\n", localtime)' 01/27/2010 14:02:34
You might be tempted to write something like:
my ($sec, $min, $hr, $day, $mon, $year) = localtime; printf("%02d/%02d/%04d %02d:%02d:%02d\n", $day, $mon + 1, 1900 + $year, $hr, $min, $sec);
as a means of avoiding POSIX. Don't! AFAIK,
POSIX.pm has been in the core since 1996 or 1997.