On Sun, May 24, 2009 at 9:17 PM, 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
It's the day of the week. 0 through 6 --> Sunday through Saturday. :) > > 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. You'd have to check the Time:::localtime man page which states this: This module's default exports override the core localtime() function, replacing it with a version that returns "Time::tm" objects. This object has methods that return the similarly named structure field name from the C's tm structure from time.h; namely sec, min, hour, mday, mon, year, wday, yday, and isdst. > > Tom George HTH, Shrivats -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/