#!/usr/bin/perl -w use POSIX; my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $year += 1900; print "$sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst\n"; $now_string = localtime; print "$now_string\n"; $date = strftime "%a %b %e %H:%M:%S %Y", localtime; print "Date1 is : $date\n"; $date = strftime "%a-%B-%e", localtime; print "Date2 is : $date\n"; $time = strftime "%H:%M:%S", localtime; print "Time1 is : $time\n"; $time1 = strftime "%h:%m:%s", localtime; print "Time2 is : $time1\n";