in reply to intersection of lists of dates produces too many results!!

As a matter of style: declare variables in as small a scope as possible. In this case you wouldn't have had a problem if you had declared @alldays and @alldays1 within the loop. You could choose a better name for @alldays1 too: @alldaysFmt whould show intent more.


Perl is Huffman encoded by design.
  • Comment on Re: intersection of lists of dates produces too many results!!

Replies are listed 'Best First'.
Re^2: intersection of lists of dates produces too many results!!
by Skeeve (Parson) on Oct 19, 2005 at 05:56 UTC

    OTOH: my @months = qw (January February March April May June July August September October November December); is better located in a broader scope, i.e. outside the $year-loop.


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

      Agreed. If one were nit picking one could point out that that is a constant and should perhaps be at global scope.


      Perl is Huffman encoded by design.