Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!noao!arizona!sunquest!rt!jew From: jew@rt.uucp (/87336) Newsgroups: comp.lang.perl Subject: Re: perl 4.0 patch #1 Message-ID: <18285@sunquest.UUCP> Date: 25 Apr 91 16:38:11 GMT References: <1991Apr18.000041.16584@sics.se> <550@appserv.Eng.Sun.COM> <3012@weber.sw.mcc.com> Sender: news@sunquest.UUCP Organization: Sunquest Information Systems Lines: 25 In the process of learning perl, I have translated an awk script I wrote. I figured there is a better way to do this: # define an array of months $Calendar{'Jan'} = '01'; $Calendar{'Feb'} = '02'; $Calendar{'Mar'} = '03'; $Calendar{'Apr'} = '04'; $Calendar{'May'} = '05'; $Calendar{'Jun'} = '06'; $Calendar{'Jul'} = '07'; $Calendar{'Aug'} = '08'; $Calendar{'Sep'} = '09'; $Calendar{'Oct'} = '10'; $Calendar{'Nov'} = '11'; $Calendar{'Dec'} = '12'; Here's your chance to show your elegance! What's the best way to define this array? jew@sunquest.com Confucious say... O'Toole's dictum: "Murphy was an optimist."