Jeff 'Japhy' Pinyan wrote: > > On Oct 27, John W. Krahn said: > > >> So what did "localtime[4]" (without parens) do? > > > >my $x = localtime[4]; > > > >Is the same as: > > > >my $x = localtime; > > > >Which assigns the scalar value of localtime to $x. The [4] part is > >ignored. > > No, it is not ignored. localtime() takes an argument -- a number of > seconds. References (such as \$x, \@y, \%z, and [4]) return a number in > numerical context. > > $x = localtime[4]; > > is the same as > > $x = localtime(0 + [4]);
Yeah, sorry, the output was right there staring me in the face and I didn't even notice it. :-) John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]