in reply to about arrays...

our @weekly_date_list;

This allows access to the package variable @weekly_date_list within the current block.

@weekly_date_list = (@weekly_date_list , "$date");

This stringizes $date and then adds it to the end of the @weekly_date_list array. I think that that author probably meant to write:

push @weekly_date_list, $date;
--
<http://www.dave.org.uk>

"The first rule of Perl club is you don't talk about Perl club."

Replies are listed 'Best First'.
Re: Re: about arrays...
by ArcaneUniverse (Initiate) on Sep 27, 2001 at 14:12 UTC
    what do u mean by current block?
    I understand "my" is used for local variable.
    so is "our" a global variable??
      what do u mean by current block?

      A block is a set of statements that are contained between a pair of braces. Blocks can be associated with subroutines, loops, conditionals and a number of other Perl constructs. There is also an implicit block around all of the code in a file.

      our (like my) is lexically scoped, this means that its effects are only felt until the end of the innermost enclosing block.

      I understand "my" is used for local variable.
      so is "our" a global variable??

      Pretty much. It exposes package variables within a given block. The differences between package and lexical variables and the subtle differences between my, local and our can get a little complex. I recommend you read the section on "Scoped Variable Declarations" that starts on p130 of the 3rd edition of the Camel.

      --
      <http://www.dave.org.uk>

      "The first rule of Perl club is you don't talk about Perl club."