in reply to How to get latest IP and hostname.

Another way to format time is to use POSIX strftime:
#!/usr/bin/perl use strict; use warnings; use POSIX qw(strftime); my $today = strftime "%a %m/%d/%Y %H:%M:%S", localtime; print $today, "\n";
I ran it, and it returned:
Thu 03/31/2011 23:45:52