I'm sure someone will have an easier way, but this does it: (The $time variable will have the format you want.)
#!perl $ourtime=localtime(); $ourtime=~s/ +/ /g; ($day_word,$month,$day_num,$time,$year)=split(/ /, $ourtime); print "TIME: $time\n"; Scott Campbell Senior Software Developer Somix Technologies (207) 324-8805 http://www.somix.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Michael C. Podlesny Sent: Friday, August 09, 2002 10:58 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Displaying time in PERL can anyone tell me how to get the time in the format of "hh:mm:ss"? _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
