On Wednesday 13 Nov 2002 5:10 pm, Aman Thind wrote: > Hi Ray > > $sec = (localtime())[0]; > $min = (localtime())[1]; > $hour = (localtime())[2]; > print "Time => $hour : $min : $sec\n"; > > $day = (localtime())[3]; > $month = (localtime())[4] + 1; > $year = (localtime())[5]; > $year = $year + 1900; > print "Date => $month \\ $day \\ $year"; > > -aman. > > -----Original Message----- > From: Olympio Raymond [mailto:rayoly@;free.fr] > Sent: Wednesday, November 13, 2002 10:36 PM > To: [EMAIL PROTECTED] > Subject: date > > > How can you write the date and our of the system with a perl command ?
If you wanted to do less typing, you could use: my ($sec,$min,$hour,$day,$month,$year)=localtime(); $year+=1900; print "Time => $hour:$min:$sec\n"; print "Date => $day/$month/$year\n"; or even just: print scalar localtime(),"\n"; -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]