Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!sun-barr!newstop!male!anywhere.EBay.Sun.COM!me From: me@anywhere.EBay.Sun.COM (Wayne Thompson - IR Workstation Support SE) Newsgroups: comp.lang.perl Subject: Re: perl4.0 patch #1 Message-ID: <6490@male.EBay.Sun.COM> Date: 25 Apr 91 19:56:21 GMT Sender: news@male.EBay.Sun.COM Lines: 28 In article <130398@uunet.UU.NET> you write: |> 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 like it! Mebbe we could get Larry to put this in 5.0! How about: (aardvark..zymurgy) |> |> 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