in reply to CGI & Creating an associative array dynamically

I have no idea where to start on this answer.

Ok. let's start with the obvious ones:

  1. You need to put use strict; at the top of every single Perl file you work with.
  2. You most especially do NOT want to use soft references. ${'flag_' . $x} is a symbolic reference. There are numerous posts on this site as to why not.
  3. A hash is built as so:
    my %labels; foreach my $lang (@languages) { $labels{"flag_$lang->[1]"} = "Something here"; }
  4. Invest the US$20 and buy yourself a copy of Learning Perl which will explain all of this for you.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested