On Sun, May 24, 2009 at 11:47, Thomas H. George <li...@tomgeorge.info> wrote: > What is $dow in the line from Alpaca, p77: > > my ($sec, $min, $hour, $day, $month, $year, $dow) = localtime; > > Curious, I wrote > > > #!/usr/bin/perl -w > > use strict; > use Time::Local; > use File::Find; > > my ($sec, $min, $hour, $day, $month, $year, $dow) = localtime; > print "Day $day Month ", $month + 1, " Year ", $year + 1900, "\n"; > print "Dow $dow\n"; > print localtime, "\n\n"; > my @numbers = grep (//,localtime); > for (@numbers) { > print $_, "\n"; > } > > and found there are actually three numbers following the number for the > year. The man page for Time::Local makes no mention of these. snip
That is because localtime is a core function. You can find its docs in the normal perldoc: from perldoc -f localtime Converts a time as returned by the time function to a 9−element list with the time analyzed for the local time zone. Typically used as follows: # 0 1 2 3 4 5 6 7 8 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); All list elements are numeric, and come straight out of the C ‘struct tm’. $sec, $min, and $hour are the seconds, minutes, and hours of the specified time. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/