Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.lang.perl Subject: Re: perl 4.0 patch #1 Message-ID: <130398@uunet.UU.NET> Date: 25 Apr 91 19:20:04 GMT References: <3012@weber.sw.mcc.com> <18285@sunquest.UUCP> <1991Apr25.182103.20549@convex.com> Organization: UUNET Communications Services, Falls Church, VA Lines: 22 In article <1991Apr25.182103.20549@convex.com> tchrist@convex.COM (Tom Christiansen) writes: ?From the keyboard of jew@rt.uucp (/87336): ?: ?:# define an array of months ?:$Calendar{'Jan'} = '01'; ?:$Calendar{'Feb'} = '02'; ? ..... ?:$Calendar{'Dec'} = '12'; ?: ?: What's the best way to define this array? ? ?How about: ? ? @Calendar{Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec} = ('01'..'12'); How about: @Calendar{Jan..Dec} = ('01'..'12'); # :-) I was all set to say: %Calendar = (Jan, '01', Feb, '02' .... Dec, '12'); but then I noticed the ellipsis. -- [rbj@uunet 1] stty sane unknown mode: sane