Title: Arrays vs Hashes

Hi all,

I was doing a date formatting function and did this:

        my %number_to_long_month = (
                 '1' => 'January',
                 '2' => 'February',
                 '3' => 'March',
                 '4' => 'April',
                 '5' => 'May',
                 '6' => 'June',
                 '7' => 'July',
                 '8' => 'August',
                 '9' => 'September',
                '10' => 'October',
                '11' => 'November',
                '12' => 'December'
        );

However I took a peek at CPAN to see if there was something that could aide me, and found this:

@MoY = qw(January February March April May June
          July August September October November December);

What would be more efficient?

Regards,

Javier Moreno
==============
Softtek/GXS
EFS NearShore - TradeWeb 2nd Tier

...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
- Sherlock Holmes


Reply via email to