Re: Timelocal's input parameters

2007-08-09 Thread Peter Scott
On Tue, 07 Aug 2007 22:47:38 -0700, timbo wrote: > Is it possible to pass timelocal a parameter that's already the exact > scalar output of localtime's format "Mon Jan 10 04:30:30 2007"? > > I know the perlfunc documentations for timelocal indicates that > arguments are in the form of ... > > tim

Re: Timelocal's input parameters

2007-08-08 Thread timbo
Thanks heaps Jeff. Both Chris and you are legends! t. Jeff Pang wrote: > -Original Message- > >From: timbo <[EMAIL PROTECTED]> > >Sent: Aug 8, 2007 1:47 AM > >To: beginners@perl.org > >Subject: Timelocal's input parameters > > > >Is it possible to pass timelocal a parameter that's already

Re: Timelocal's input parameters

2007-08-08 Thread oryann9
- > No, it is a hash slice. > > my %foo; > @foo{ qw / one two three / } = qw / uno dos tres / ; > > is equivalent to > > my %foo = ( one => 'uno', > two => 'dos', > three => 'tres' ); > > is equivalent to ... > > my %foo; > $foo{one} = 'uno'; > $foo{two} =

Re: Timelocal's input parameters

2007-08-08 Thread Paul Lalli
On Aug 8, 11:26 am, [EMAIL PROTECTED] (Oryann9) wrote: > Is this an array of hashes desingnated by { }? > > my %month; > @month{ qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct > Nov Dec/ } = 0..11; No. That is a hash-slice. Just as you identify one value of a hash by changing the % to a $ and puttin

Re: Timelocal's input parameters

2007-08-08 Thread Lawrence Statton
> > Is this an array of hashes desingnated by { }? > > my %month; > @month{ qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct > Nov Dec/ } = 0..11; > No, it is a hash slice. my %foo; @foo{ qw / one two three / } = qw / uno dos tres / ; is equivalent to my %foo = ( one => 'uno', t

Re: Timelocal's input parameters

2007-08-08 Thread Jeff Pang
-Original Message- >From: oryann9 <[EMAIL PROTECTED]> >Sent: Aug 8, 2007 11:26 AM >To: beginners@perl.org >Subject: Re: Timelocal's input parameters > > > >> #!/usr/bin/perl >> use strict; >> use warnings; >> use Time::Local; >

Re: Timelocal's input parameters

2007-08-08 Thread oryann9
> #!/usr/bin/perl > use strict; > use warnings; > use Time::Local; > > my %month; > @month{ qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct > Nov Dec/ } = 0..11; > > my $date = "Thu Mar 9 23:04:03 2006"; > > my (undef, $month, $day, $h, $m, $s, $year) = split > /\W+/, $date; > > my $time = > time

Re: Timelocal's input parameters

2007-08-08 Thread Jeff Pang
-Original Message- >From: timbo <[EMAIL PROTECTED]> >Sent: Aug 8, 2007 1:47 AM >To: beginners@perl.org >Subject: Timelocal's input parameters > >Is it possible to pass timelocal a parameter that's already the exact >scalar output of localtime's format "Mon Jan 10 04:30:30 2007"? > >I know