what is the default return type of localtime() in perl?

Hi,

I have given like this to get the time of the sub routine.

my $start = localtime();
print "\n start time: $start \n";

Output

start time: Fri Apr 29 01:01:31 2011 

I want to know what is the format of the time.

I am not able to follow is is HH:MM:SS or MM:HH:SS os SS:MM:HH.

What does date command return type?

Fri Apr 29 01:10:20 EDT 2011
01:10:20 what is the format?
EDT  means what?

How to know exactly time taken by each statement in the sub routine in perl?

Regards
Vanitha

EDT is the timezone I guess like IST (Indian Standard Time), GMT etc

Time Format is HH:MM:SS YYYY

regards,
Ahamed

If you run the commands a few times over the course of at most 60 seconds, you can probably decipher the format yourself. :wink:

Their respective man pages have the answers as well.

localtime - perldoc.perl.org
ctime
asctime
date

Regards,
Alister