[lug] Perl Question..

Joseph McDonald joem at uu.net
Wed Apr 16 15:49:29 MDT 2003


Hi,

Not directly linux related, so hopefully I don't get flamed
but can anyone think of a way to sort this array into a list
which matches the actual calandar months? Meaning, Jan, Feb,
March, April ... Dec. I've been racking my brain today to no
avail:

my @array = qw(January
                April
                Feburary
                June
                March
                August
                May
                October
                July
                November
                September
                December);

for (@array) { 
   print "$_\n"; 
}

This isn't homework or anything, it's actually part of a larger
script I'm working. Thanks for any ideas!




More information about the LUG mailing list